edu.illinois.cs.cogcomp.lbj.coref.util.io
Interface RandomAccessInput
- All Superinterfaces:
- RandomAccessData
- All Known Implementing Classes:
- RandomAccessByteBuffer
public interface RandomAccessInput
- extends RandomAccessData
Interface for reading bytes in an arbitrary order.
Intended as a partial drop-in replacement for read-only RandomAccessFile
objects, although non-file data sources may be used.
Method Summary |
int |
read()
Reads a byte of data from the cursor position. |
read
int read()
throws java.io.IOException
- Reads a byte of data from the cursor position.
The byte is returned as an integer in the inclusive range 0-255.
This method blocks if no input is available.
This method behaves just as
InputStream
's read method.
- Returns:
- The next byte of data, or -1 if the end of file has been reached.
- Throws:
java.io.IOException
- if an I/O error occurs, but NOT if end-of-file.