Top Fields Constructors Methods
org.apache.derby.client.am

public Class SignedBinary

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
public static final int
BIG_ENDIAN

Unix byte-order for signed binary representations.

public static final int
LITTLE_ENDIAN

Intel 80/86 reversed byte-order for signed binary representations.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
pack-priv static byte
getByte(byte[] buffer, int offset)

Get a byte from the buffer.

public static final int

Returns:

the value at that address
getInt
(byte[]
The buffer to read from
buffer
,
int
The offset to start reading at
offset
)

Build a Java int from a 4-byte signed binary representation.

public static final long

Returns:

the value at that address
getLong
(byte[]
The buffer to read from
buffer
,
int
The offset to start reading at
offset
)

Build a Java long from an 8-byte signed binary representation.

public static short

Returns:

the value at that address
getShort
(byte[]
The buffer to read from
buffer
,
int
The offset to start reading at
offset
)

Build a Java short from a 2-byte signed binary representation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BIG_ENDIANback to summary
public static final int BIG_ENDIAN

Unix byte-order for signed binary representations.

LITTLE_ENDIANback to summary
public static final int LITTLE_ENDIAN

Intel 80/86 reversed byte-order for signed binary representations.

Constructor Detail

SignedBinaryback to summary
private SignedBinary()

Method Detail

getByteback to summary
pack-priv static byte getByte(byte[] buffer, int offset)

Get a byte from the buffer.

getIntback to summary
public static final int getInt(byte[] buffer, int offset)

Build a Java int from a 4-byte signed binary representation.

Parameters
buffer:byte[]

The buffer to read from

offset:int

The offset to start reading at

Returns:int

the value at that address

Exceptions
IllegalArgumentException:
if the specified byte order is not recognized.
getLongback to summary
public static final long getLong(byte[] buffer, int offset)

Build a Java long from an 8-byte signed binary representation.

Parameters
buffer:byte[]

The buffer to read from

offset:int

The offset to start reading at

Returns:long

the value at that address

Exceptions
IllegalArgumentException:
if the specified byte order is not recognized.
getShortback to summary
public static short getShort(byte[] buffer, int offset)

Build a Java short from a 2-byte signed binary representation.

Parameters
buffer:byte[]

The buffer to read from

offset:int

The offset to start reading at

Returns:short

the value at that address

Exceptions
IllegalArgumentException:
if the specified byte order is not recognized.