public interface ByteStoreAccess
DataInput
, but omits some of the methods
there, and adds seek(long)
and skip(int)
methods.
A pointer is maintained, and is advanced appropriately by the various
read methods.Modifier and Type | Method and Description |
---|---|
byte |
readByte()
Reads a byte from the current position.
|
void |
readBytes(byte[] b,
int off,
int len)
Reads bytes into a buffer from the current position.
|
char |
readChar()
Reads a char from the current position.
|
double |
readDouble()
Reads a double from the current position.
|
float |
readFloat()
Reads a float from the current position.
|
int |
readInt()
Reads an int from the current position.
|
long |
readLong()
Reads a long from the current position.
|
short |
readShort()
Reads a short from the current position.
|
void |
seek(long pos)
Sets the position to the given value.
|
void |
skip(int len)
Advances the position by a given number of bytes.
|
byte readByte() throws java.io.IOException
java.io.IOException
short readShort() throws java.io.IOException
java.io.IOException
char readChar() throws java.io.IOException
java.io.IOException
int readInt() throws java.io.IOException
java.io.IOException
long readLong() throws java.io.IOException
java.io.IOException
float readFloat() throws java.io.IOException
java.io.IOException
double readDouble() throws java.io.IOException
java.io.IOException
void readBytes(byte[] b, int off, int len) throws java.io.IOException
b
- buffer to receive bytesoff
- offset into b
for first bytelen
- number of bytes to readjava.io.IOException
void seek(long pos) throws java.io.IOException
pos
- new positionjava.io.IOException
void skip(int len) throws java.io.IOException
len
- number of bytesjava.io.IOException