DataIOpublic class DataIO extends Object Some I-O primitives for datastreams.
All methods are static, since there is no state. |
Constructors Summary |
---|
private DataIO()Nobody should need to create an instance; all methods are static
// nothing to do
|
Methods Summary |
---|
public static long | readUnsignedInt(java.io.DataInput is)Read an unsigned int from a DataInput
// Need to read 4 bytes from the input, unsigned.
// Do it yourself; there is no readUnsignedInt().
return
((long)(is.readUnsignedByte() & 0xff) << 24) |
((long)(is.readUnsignedByte() & 0xff) << 16) |
((long)(is.readUnsignedByte() & 0xff) << 8) |
((long)(is.readUnsignedByte() & 0xff) << 0);
|
|