org.apache.derby.client.am
Class SignedBinary

java.lang.Object
  extended by org.apache.derby.client.am.SignedBinary

public class SignedBinary
extends java.lang.Object


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.
 
Constructor Summary
private SignedBinary()
           
 
Method Summary
static byte getByte(byte[] buffer, int offset)
          Get a byte from the buffer.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BIG_ENDIAN

public static final int BIG_ENDIAN
Unix byte-order for signed binary representations.

See Also:
Constant Field Values

LITTLE_ENDIAN

public static final int LITTLE_ENDIAN
Intel 80/86 reversed byte-order for signed binary representations.

See Also:
Constant Field Values
Constructor Detail

SignedBinary

private SignedBinary()
Method Detail

getByte

public static final byte getByte(byte[] buffer,
                                 int offset)
Get a byte from the buffer.


getShort

public static final short getShort(byte[] buffer,
                                   int offset)
Build a Java short from a 2-byte signed binary representation.

Throws:
java.lang.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:
java.lang.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:
java.lang.IllegalArgumentException - if the specified byte order is not recognized.

Built on Wed 2013-06-12 15:21:56+0000, from revision ???

Apache Derby V10.10 Internals - Copyright © 2004,2013 The Apache Software Foundation. All Rights Reserved.