|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | 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, getByteOrdering, writeByte, writeDouble, writeFloat, writeInt, writeLong, writeShort |
| Method Detail |
public void close()
throws java.io.IOException
java.io.IOException - If an I/O error ocurred.
public int getPos()
throws java.io.IOException
java.io.IOException - If an I/O error ocurred.
public int length()
throws java.io.IOException
java.io.IOException - If an I/O error ocurred.
public void seek(int off)
throws java.io.IOException
off - The offset where to move to.
java.io.EOFException - If in read-only and seeking beyond EOF.
java.io.IOException - If an I/O error ocurred.
public int read()
throws java.io.EOFException,
java.io.IOException
java.io.EOFException - If the end-of file was reached.
java.io.IOException - If an I/O error ocurred.
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.
java.io.EOFException - If the end-of file was reached before
getting all the necessary data.
java.io.IOException - If an I/O error ocurred.
public void write(int b)
throws java.io.IOException
b - The byte to write. The lower 8 bits of b are
written.
java.io.IOException - If an I/O error ocurred.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||