| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: < 0 if a < b; 0 if a == b; > 0 if a > b.the first value to compare. a, final int the second value to compare. b)Compare a 32 bit unsigned integer stored in a 32 bit signed integer. |
| public static int | Returns: < 0 if a < b; 0 if a == b; > 0 if a > b.the first value to compare. a, final long the second value to compare. b)Compare a 64 bit unsigned integer stored in a 64 bit signed integer. |
| public static int | Returns: signed integer value that matches the 32 bits read.buffer to acquire the 4 bytes of data from. intbuf, final int position within the buffer to begin reading from. This
position and the next 3 bytes after it (for a total of 4
bytes) will be read. offset)Convert sequence of 4 bytes (network byte order) into signed value. |
| public static long | Returns: signed integer value that matches the 64 bits read.buffer to acquire the 8 bytes of data from. intbuf, final int position within the buffer to begin reading from. This
position and the next 7 bytes after it (for a total of 8
bytes) will be read. offset)Convert sequence of 8 bytes (network byte order) into signed value. |
| public static int | Returns: unsigned integer value that matches the 16 bits read.buffer to acquire the 2 bytes of data from. intbuf, final int position within the buffer to begin reading from. This
position and the next byte after it (for a total of 2 bytes)
will be read. offset)Convert sequence of 2 bytes (network byte order) into unsigned value. |
| public static int | Returns: signed integer value that matches the 24 bits read.buffer to acquire the 3 bytes of data from. intbuf, int position within the buffer to begin reading from. This
position and the next 2 bytes after it (for a total of 3
bytes) will be read. offset)Convert sequence of 3 bytes (network byte order) into unsigned value. |
| public static long | Returns: unsigned integer value that matches the 32 bits read.buffer to acquire the 4 bytes of data from. intbuf, final int position within the buffer to begin reading from. This
position and the next 3 bytes after it (for a total of 4
bytes) will be read. offset)Convert sequence of 4 bytes (network byte order) into unsigned value. |
| public static long | Returns: unsigned integer value that matches the 64 bits read.buffer to acquire the 8 bytes of data from. intbuf, final int position within the buffer to begin reading from. This
position and the next 7 bytes after it (for a total of 8
bytes) will be read. offset)Convert sequence of 8 bytes (network byte order) into unsigned value. |
| public static void | encodeInt16(final byte[]
buffer to write the 2 bytes of data into. intbuf, final int position within the buffer to begin writing to. This position
and the next byte after it (for a total of 2 bytes) will be
replaced. offset, int the value to write. v)Write a 16 bit integer as a sequence of 2 bytes (network byte order). |
| public static void | encodeInt24(byte[]
buffer to write the 3 bytes of data into. intbuf, int position within the buffer to begin writing to. This position
and the next 2 bytes after it (for a total of 3 bytes) will be
replaced. offset, int the value to write. v)Write a 24 bit integer as a sequence of 3 bytes (network byte order). |
| public static void | encodeInt32(final byte[]
buffer to write the 4 bytes of data into. intbuf, final int position within the buffer to begin writing to. This position
and the next 3 bytes after it (for a total of 4 bytes) will be
replaced. offset, int the value to write. v)Write a 32 bit integer as a sequence of 4 bytes (network byte order). |
| public static void | encodeInt64(final byte[]
buffer to write the 8 bytes of data into. intbuf, final int position within the buffer to begin writing to. This position
and the next 7 bytes after it (for a total of 8 bytes) will be
replaced. offset, long the value to write. v)Write a 64 bit integer as a sequence of 8 bytes (network byte order). |
| NB | back to summary |
|---|---|
| private NB() | |
| compareUInt32 | back to summary |
|---|---|
| public static int compareUInt32(final int a, final int b) Compare a 32 bit unsigned integer stored in a 32 bit signed integer. This function performs an unsigned compare operation, even though Java does not natively support unsigned integer values. Negative numbers are treated as larger than positive ones.
| |
| compareUInt64 | back to summary |
|---|---|
| public static int compareUInt64(final long a, final long b) Compare a 64 bit unsigned integer stored in a 64 bit signed integer. This function performs an unsigned compare operation, even though Java does not natively support unsigned integer values. Negative numbers are treated as larger than positive ones.
| |
| decodeInt32 | back to summary |
|---|---|
| public static int decodeInt32(final byte[] intbuf, final int offset) Convert sequence of 4 bytes (network byte order) into signed value.
| |
| decodeInt64 | back to summary |
|---|---|
| public static long decodeInt64(final byte[] intbuf, final int offset) Convert sequence of 8 bytes (network byte order) into signed value.
| |
| decodeUInt16 | back to summary |
|---|---|
| public static int decodeUInt16(final byte[] intbuf, final int offset) Convert sequence of 2 bytes (network byte order) into unsigned value.
| |
| decodeUInt24 | back to summary |
|---|---|
| public static int decodeUInt24(byte[] intbuf, int offset) Convert sequence of 3 bytes (network byte order) into unsigned value.
| |
| decodeUInt32 | back to summary |
|---|---|
| public static long decodeUInt32(final byte[] intbuf, final int offset) Convert sequence of 4 bytes (network byte order) into unsigned value.
| |
| decodeUInt64 | back to summary |
|---|---|
| public static long decodeUInt64(final byte[] intbuf, final int offset) Convert sequence of 8 bytes (network byte order) into unsigned value.
| |
| encodeInt16 | back to summary |
|---|---|
| public static void encodeInt16(final byte[] intbuf, final int offset, int v) Write a 16 bit integer as a sequence of 2 bytes (network byte order).
| |
| encodeInt24 | back to summary |
|---|---|
| public static void encodeInt24(byte[] intbuf, int offset, int v) Write a 24 bit integer as a sequence of 3 bytes (network byte order).
| |
| encodeInt32 | back to summary |
|---|---|
| public static void encodeInt32(final byte[] intbuf, final int offset, int v) Write a 32 bit integer as a sequence of 4 bytes (network byte order).
| |
| encodeInt64 | back to summary |
|---|---|
| public static void encodeInt64(final byte[] intbuf, final int offset, long v) Write a 64 bit integer as a sequence of 8 bytes (network byte order).
| |