|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.client.am.SignedBinary
public class SignedBinary
Field Summary | |
---|---|
static int |
BIG_ENDIAN
Unix byte-order for signed binary representations. |
static int |
LITTLE_ENDIAN
Intel 80/86 reversed byte-order for signed binary representations. |
static long |
MAX_LONG_6_BYTES_SIGNED
Maximum value that cen be encoded by 6 bytes (signed). |
Constructor Summary | |
---|---|
private |
SignedBinary()
|
Method Summary | |
---|---|
static int |
getInt(byte[] buffer,
int offset)
Build a Java int from a 4-byte signed binary representation. |
static 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. |
static void |
intToBigEndianBytes(byte[] buffer,
int offset,
int v)
Write a Java int to a 4-byte big endian signed binary representation. |
static void |
long6BytesToBigEndianBytes(byte[] buffer,
int offset,
long v)
Writes a Java long to a 6-byte big endian signed binary representation. |
static void |
longToBigEndianBytes(byte[] buffer,
int offset,
long v)
Write a Java long to an 8-byte big endian signed binary representation. |
static void |
shortToBigEndianBytes(byte[] buffer,
int offset,
short v)
Write a Java short to a 2-byte big endian signed binary representation. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long MAX_LONG_6_BYTES_SIGNED
public static final int BIG_ENDIAN
public static final int LITTLE_ENDIAN
Constructor Detail |
---|
private SignedBinary()
Method Detail |
---|
public static final short getShort(byte[] buffer, int offset)
java.lang.IllegalArgumentException
- if the specified byte order is not recognized.public static final int getInt(byte[] buffer, int offset)
java.lang.IllegalArgumentException
- if the specified byte order is not recognized.public static final long getLong(byte[] buffer, int offset)
java.lang.IllegalArgumentException
- if the specified byte order is not recognized.public static final void shortToBigEndianBytes(byte[] buffer, int offset, short v)
public static final void intToBigEndianBytes(byte[] buffer, int offset, int v)
public static void long6BytesToBigEndianBytes(byte[] buffer, int offset, long v)
buffer
- the buffer to write intooffset
- the offset at which to start writingv
- the value to be written
java.lang.IllegalArgumentException
- if the long value is too large to be
represented by six bytes.public static final void longToBigEndianBytes(byte[] buffer, int offset, long v)
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |