public final class Constants extends Object
This class defines all the constants needed by the parsing and serializing process.
| Modifier and Type | Field and Description |
|---|---|
static int |
BYTES_PER_INT
The java data type int need
4 bytes. |
static int |
CONTINUE_FLAG_MASK
Bit mask to extract the continue flag of a
32 bit number. |
static int |
FIRST_BYTE_MASK
Bit mask to extract the first byte of a
32 bit number. |
static int |
FIRST_TWO_BYTES_MASK
Bit mask to extract the first two bytes of a
32 bit number. |
static int |
FOUR_BYTES_SHIFT
Shift a given number by
32 bits or 4 bytes. |
static int |
FOURTH_BYTE_MASK
Bit mask to extract the fourth byte of a
32 bit number. |
static long |
LAST_FOUR_BYTES_MASK
Bit mask to extract the last four bytes of a
64 bit number. |
static int |
LAST_THREE_BYTES_MASK
Bit mask to extract the three last bytes of a
32 bit number. |
static int |
LAST_TWO_BYTES_MASK
Bit mask to extract the last bytes of a
32 bit number. |
static int |
LOG_INITIAL_SIZE
The intial size of the StringBuilder used for logging.
|
static int |
MIDDLE_TWO_BYTES_SHIFT
Bit mask to extract the second and third bytes of a
32 bit
number. |
static int |
ONE_BYTE_SHIFT
Shift a given number by
8 bits or 1 byte. |
static int |
READ_RESIDUAL_OVERFLOW_FLAG_MASK
Set for Bidirectional Read Residual Overflow.
|
static int |
READ_RESIDUAL_UNDERFLOW_FLAG_MASK
Set for Bidirectional Read Residual Underflow.
|
static byte |
RESERVED_BYTE
Reserved fields are marked as zeros in a
byte data type. |
static int |
RESERVED_INT
Reserved fields are marked as zeros in a
integer data type. |
static long |
RESERVED_LONG
Reserved fields are marked as zeros in a
long data type. |
static short |
RESERVED_SHORT
Reserved fields are marked as zeros in a
short data type. |
static int |
RESIDUAL_OVERFLOW_FLAG_MASK
Set for Residual Overflow.
|
static int |
RESIDUAL_UNDERFLOW_FLAG_MASK
Set for Residual Underflow.
|
static int |
SECOND_BYTE_MASK
Bit mask to extract the second byte of a
32 bit number. |
static int |
THIRD_BYTE_MASK
Bit mask to extract the third byte of a
32 bit number. |
static int |
THREE_BYTES_SHIFT
Shift a given number by
24 bits or 3 bytes. |
static int |
TWO_BYTES_SHIFT
Shift a given number by
16 bits or 2 bytes. |
| Constructor and Description |
|---|
Constants() |
public static final int BYTES_PER_INT
4 bytes.public static final int LOG_INITIAL_SIZE
public static final int ONE_BYTE_SHIFT
8 bits or 1 byte.public static final int TWO_BYTES_SHIFT
16 bits or 2 bytes.public static final int THREE_BYTES_SHIFT
24 bits or 3 bytes.public static final int FOUR_BYTES_SHIFT
32 bits or 4 bytes.public static final int FIRST_BYTE_MASK
32 bit number.public static final int SECOND_BYTE_MASK
32 bit number.public static final int THIRD_BYTE_MASK
32 bit number.public static final int FOURTH_BYTE_MASK
32 bit number.public static final int FIRST_TWO_BYTES_MASK
32 bit number.public static final int MIDDLE_TWO_BYTES_SHIFT
32 bit
number.public static final int LAST_TWO_BYTES_MASK
32 bit number.public static final int LAST_THREE_BYTES_MASK
32 bit number.public static final long LAST_FOUR_BYTES_MASK
64 bit number.public static final byte RESERVED_BYTE
byte data type.public static final short RESERVED_SHORT
short data type.public static final int RESERVED_INT
integer data type.public static final long RESERVED_LONG
long data type.public static final int CONTINUE_FLAG_MASK
32 bit number.public static final int RESIDUAL_OVERFLOW_FLAG_MASK
public static final int RESIDUAL_UNDERFLOW_FLAG_MASK
public static final int READ_RESIDUAL_OVERFLOW_FLAG_MASK
public static final int READ_RESIDUAL_UNDERFLOW_FLAG_MASK
Copyright © 2013 University of Konstanz, Distributed Systems Group. All Rights Reserved.