|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object micromod.DataReader
The DataReader contains methods to convert data on an implementation of DataInput into a more useful format. DataInput is only used to read bytes and arrays of bytes to aid portability.
Field Summary | |
protected static int |
CONVERT_BUFFER_SIZE
|
protected byte[] |
convertBuffer
|
protected java.io.DataInput |
input
|
Constructor Summary | |
DataReader(java.io.DataInput input)
Constructor |
Method Summary | |
static int |
readInt32(java.io.DataInput input)
Read a signed 32 bit integer. |
static short |
readSigned16Bit(java.io.DataInput input)
Read a single signed 16 bit word. |
void |
readSigned16BitArray(short[] array,
int offset,
int length)
Read length 16 bit signed, big endian words from the DataInput device into the specified array. |
static byte |
readSigned8Bit(java.io.DataInput input)
Read a single signed byte. |
static void |
readSigned8BitArray(java.io.DataInput input,
byte[] array,
int offset,
int length)
Read length 8 bit signed words from the DataInput device into the specified array. |
static java.lang.String |
readText(java.io.DataInput input,
int count)
Simple method to read ASCII text and convert nulls to spaces. |
static int |
readUnsigned16Bit(java.io.DataInput input)
Read a single unsigned 16 bit word. |
static byte |
readUnsigned7Bit(java.io.DataInput input)
Read a positive number from a byte between 0 and 127. |
static int |
readUnsigned8Bit(java.io.DataInput input)
Read a single unsigned byte. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final int CONVERT_BUFFER_SIZE
protected byte[] convertBuffer
protected java.io.DataInput input
Constructor Detail |
public DataReader(java.io.DataInput input)
Method Detail |
public void readSigned16BitArray(short[] array, int offset, int length) throws java.io.IOException
java.io.IOException
public static int readInt32(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static byte readUnsigned7Bit(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static byte readSigned8Bit(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static int readUnsigned8Bit(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static void readSigned8BitArray(java.io.DataInput input, byte[] array, int offset, int length) throws java.io.IOException
java.io.IOException
public static short readSigned16Bit(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static int readUnsigned16Bit(java.io.DataInput input) throws java.io.IOException
java.io.IOException
public static java.lang.String readText(java.io.DataInput input, int count) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |