All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.MBone.Utils.ShortInt
java.lang.Object
|
+----ncsa.MBone.Utils.ShortInt
- public class ShortInt
- extends Object
This is a class I wrote for I have some trouble writing/readin out/in
in a file a two bytes integer. I didn't know by this time that this
was taken care of in the java API. Too bad.
-
ShortInt()
-
-
readIntLSB(byte[], int)
- Reads an 'int' from an array, at a specified position, whose
two least significant bytes are taken from the array.
-
writeIntLSB(byte[], int, int)
- Writes the two least significant bytes of an 'int' into
an array at the specified position.
ShortInt
public ShortInt()
writeIntLSB
public static void writeIntLSB(byte array[],
int position,
int the_int)
- Writes the two least significant bytes of an 'int' into
an array at the specified position. This method must be used
in conjunction with readIntLSB, that makes the reverse operation.
readIntLSB
public static int readIntLSB(byte array[],
int position)
- Reads an 'int' from an array, at a specified position, whose
two least significant bytes are taken from the array. Other bytes
equal zero. This method must be used
in conjunction with writeIntLSB, that makes the reverse operation.
All Packages Class Hierarchy This Package Previous Next Index