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 IOException
IOException
short readShort() throws IOException
IOException
char readChar() throws IOException
IOException
int readInt() throws IOException
IOException
long readLong() throws IOException
IOException
float readFloat() throws IOException
IOException
double readDouble() throws IOException
IOException
void readBytes(byte[] b, int off, int len) throws IOException
b
- buffer to receive bytesoff
- offset into b
for first bytelen
- number of bytes to readIOException
void seek(long pos) throws IOException
pos
- new positionIOException
void skip(int len) throws IOException
len
- number of bytesIOException
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.