org.cdgsoftware.icl.util
Class RecordLength

java.lang.Object
  extended by org.cdgsoftware.icl.util.RecordLength

public class RecordLength
extends java.lang.Object

The Class RecordLength.


Constructor Summary
RecordLength()
           
 
Method Summary
static int byteArrayToInt(byte[] b)
          Convert the byte array to an int.
static int byteArrayToInt(byte[] b, int offset)
          Convert the byte array to an int starting from the given offset.
static byte[] intToByteArray(int value, int arrayLength)
          Convert the integer value into a byte array of arrayLength bytes.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordLength

public RecordLength()
Method Detail

byteArrayToInt

public static int byteArrayToInt(byte[] b)
Convert the byte array to an int.

Parameters:
b - The byte array
Returns:
The integer

byteArrayToInt

public static int byteArrayToInt(byte[] b,
                                 int offset)
Convert the byte array to an int starting from the given offset.

Parameters:
b - The byte array
offset - The array offset
Returns:
The integer

intToByteArray

public static byte[] intToByteArray(int value,
                                    int arrayLength)
Convert the integer value into a byte array of arrayLength bytes.

Parameters:
value - the value
arrayLength - the array length
Returns:
the byte array