public class ArrayReader extends Object
Represents a byte array data reader.
Constructor and Description |
---|
ArrayReader(byte[] array)
Initializes a new instance of the
ArrayReader class. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getArray()
Gets the byte array.
|
int |
getIndex()
Gets the current reading position.
|
boolean |
readBoolean()
Reads the next boolean value in the array.
|
byte |
readByte()
Reads the next byte in the array.
|
char |
readChar()
Reads the next char value in the array.
|
double |
readDouble()
Reads the next double value in the array.
|
int |
readInt32()
Reads the next int value in the array.
|
long |
readInt64()
Reads the next long value in the array.
|
String |
readString()
Reads the next String value in the array.
|
public ArrayReader(byte[] array)
Initializes a new instance of the ArrayReader
class.
array
- The byte array to read from.public final byte[] getArray()
Gets the byte array.
public final int getIndex()
Gets the current reading position.
public final byte readByte()
Reads the next byte in the array.
public final boolean readBoolean()
Reads the next boolean value in the array.
public final char readChar()
Reads the next char value in the array.
public final int readInt32()
Reads the next int value in the array.
public final long readInt64()
Reads the next long value in the array.
public final double readDouble()
Reads the next double value in the array.
public final String readString()
Reads the next String value in the array.