com.pivotal.gemfirexd.internal.client.am

## Class SignedBinary

- java.lang.Object
- - com.pivotal.gemfirexd.internal.client.am.SignedBinary

    public class SignedBinary
    extends Object

### Field Summary

Fields
`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.

### Method Summary

Methods
`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` `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

#### 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

### Method Detail

#### getShort

    public static final 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.

#### shortToBigEndianBytes

    public static final void shortToBigEndianBytes(byte[] buffer,
                             int offset,
                             short v)

Write a Java short to a 2-byte big endian signed binary representation.

#### intToBigEndianBytes

    public static final void intToBigEndianBytes(byte[] buffer,
                           int offset,
                           int v)

Write a Java int to a 4-byte big endian signed binary representation.

#### longToBigEndianBytes

    public static final void longToBigEndianBytes(byte[] buffer,
                            int offset,
                            long v)

Write a Java long to an 8-byte big endian signed binary representation.