com.isti.util
Class EndianUtilFns

java.lang.Object
  extended by com.isti.util.EndianUtilFns

public class EndianUtilFns
extends java.lang.Object


Constructor Summary
protected EndianUtilFns()
           
 
Method Summary
static char getLeChar(byte[] buf)
          Gets a little-endian 16 bit char.
static double getLeDouble(byte[] buf)
          Gets a little-endian 64 bit double.
static float getLeFloat(byte[] buf)
          Gets a little-endian 32 bit float.
static int getLeInt(byte[] buf)
          Gets a little-endian 32 bit int.
static long getLeLong(byte[] buf)
          Gets a little-endian 64 bit long.
static short getLeShort(byte[] buf)
          Gets a little-endian 16 bit short.
static int getLeUnsignedShort(byte[] buf)
          Gets a little-endian unsigned 16 bit short.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EndianUtilFns

protected EndianUtilFns()
Method Detail

getLeShort

public static short getLeShort(byte[] buf)
Gets a little-endian 16 bit short.

Parameters:
buf - data buffer.
Returns:
the 16 bit short.

getLeUnsignedShort

public static int getLeUnsignedShort(byte[] buf)
Gets a little-endian unsigned 16 bit short.

Parameters:
buf - data buffer.
Returns:
the 16 bit short.

getLeChar

public static char getLeChar(byte[] buf)
Gets a little-endian 16 bit char.

Parameters:
buf - data buffer.
Returns:
the 16 bit char.
Throws:
EOFException - If end of file is reached.
IOException - If other I/O error has occurred.

getLeInt

public static int getLeInt(byte[] buf)
Gets a little-endian 32 bit int.

Parameters:
buf - data buffer.
Returns:
the 32 bit integer.

getLeLong

public static long getLeLong(byte[] buf)
Gets a little-endian 64 bit long.

Parameters:
buf - data buffer.
Returns:
the 64 bit long.

getLeFloat

public static float getLeFloat(byte[] buf)
Gets a little-endian 32 bit float.

Parameters:
buf - data buffer.
Returns:
the 32 bit float.

getLeDouble

public static double getLeDouble(byte[] buf)
Gets a little-endian 64 bit double.

Parameters:
buf - data buffer.
Returns:
the 64 bit double.