Package org.apache.derby.client.am
Class SignedBinary
java.lang.Object
org.apache.derby.client.am.SignedBinary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Unix byte-order for signed binary representations.static final int
Intel 80/86 reversed byte-order for signed binary representations. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static byte
getByte
(byte[] buffer, int offset) Get a byte from the buffer.static final int
getInt
(byte[] buffer, int offset) Build a Java int from a 4-byte signed binary representation.static final long
getLong
(byte[] buffer, int offset) Build a Java long from an 8-byte signed binary representation.static short
getShort
(byte[] buffer, int offset) Build a Java short from a 2-byte signed binary representation.
-
Field Details
-
BIG_ENDIAN
public static final int BIG_ENDIANUnix byte-order for signed binary representations.- See Also:
-
LITTLE_ENDIAN
public static final int LITTLE_ENDIANIntel 80/86 reversed byte-order for signed binary representations.- See Also:
-
-
Constructor Details
-
SignedBinary
private SignedBinary()
-
-
Method Details
-
getByte
static byte getByte(byte[] buffer, int offset) Get a byte from the buffer. -
getShort
public static short getShort(byte[] buffer, int offset) Build a Java short from a 2-byte signed binary representation.- Throws:
IllegalArgumentException
- if the specified byte order is not recognized.
-
getInt
public static final int getInt(byte[] buffer, int offset) Build a Java int from a 4-byte signed binary representation.- Throws:
IllegalArgumentException
- if the specified byte order is not recognized.
-
getLong
public static final long getLong(byte[] buffer, int offset) Build a Java long from an 8-byte signed binary representation.- Throws:
IllegalArgumentException
- if the specified byte order is not recognized.
-