|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This abstract class defines the interface to perform random access I/O. It implements the BinaryDataInput and BinaryDataOutput interfaces so that binary data input/output can be performed.
This interface supports streams of up to 2 GB in length.
BinaryDataInput
,
BinaryDataOutput
Method Summary | |
void |
close()
Closes the I/O stream. |
int |
getPos()
Returns the current position in the stream, which is the position from where the next byte of data would be read. |
int |
length()
Returns the current length of the stream, in bytes, taking into account any buffering. |
int |
read()
Reads a byte of data from the stream. |
void |
readFully(byte[] b,
int off,
int len)
Reads up to len bytes of data from this file into an array of bytes. |
void |
seek(int off)
Moves the current position for the next read or write operation to offset. |
void |
write(int b)
Writes a byte to the stream. |
Methods inherited from interface jj2000.j2k.io.BinaryDataInput |
getByteOrdering,
readByte,
readDouble,
readFloat,
readInt,
readLong,
readShort,
readUnsignedByte,
readUnsignedInt,
readUnsignedShort,
skipBytes |
Methods inherited from interface jj2000.j2k.io.BinaryDataOutput |
flush,
writeByte,
writeDouble,
writeFloat,
writeInt,
writeLong,
writeShort |
Method Detail |
public void close() throws java.io.IOException
public int getPos() throws java.io.IOException
public int length() throws java.io.IOException
public void seek(int off) throws java.io.IOException
off
- The offset where to move to.public int read() throws java.io.EOFException, java.io.IOException
public void readFully(byte[] b, int off, int len) throws java.io.IOException
b
- The buffer into which the data is to be read. It must be long
enough.off
- The index in 'b' where to place the first byte read.len
- The number of bytes to read.public void write(int b) throws java.io.IOException
b
- The byte to write. The lower 8 bits of b are
written.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |