| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private long | |
| private RandomAccessRead | |
| private final long | |
| private final long |
| Access | Constructor and Description |
|---|---|
| public | RandomAccessReadView(RandomAccessRead
the underlying random access read randomAccessRead, long start position within the underlying random access read startPosition, long stream length streamLength)Constructor. |
| public | RandomAccessReadView(RandomAccessRead
the underlying random access read randomAccessRead, long start position within the underlying random access read startPosition, long stream length streamLength, boolean close the underlying random access read when closing the view if set to true closeInput)Constructor. |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| public void | close()
Implements java. Closes this stream and releases any system resources associated with it. |
| public RandomAccessReadView | createView(long
start position within the underlying random access read startPosition, long stream length streamLength)Implements org. Creates a random access read view starting at the given position with the given length. |
| public long | getPosition()
Implements org. Returns offset of next byte to be returned by a read method. |
| public boolean | isClosed()
Implements org. Returns true if this source has been closed. |
| public boolean | isEOF()
Implements org. A simple test to see if we are at the end of the data. |
| public long | length()
Implements org. The total number of bytes that are available. |
| public int | |
| public int | read(byte[]
The buffer to write the data to. b, int Offset into the buffer to start writing. off, int The amount of data to attempt to read. len)Implements org. Read a buffer of data. |
| private void | |
| public void | rewind(int
the number of bytes to be seeked backwards bytes)Overrides default org. Seek backwards the given number of bytes. |
| public void | seek(final long
The position to seek to. newOffset)Implements org. Seek to a position in the data. |
| closeInput | back to summary |
|---|---|
| private final boolean closeInput | |
| currentPosition | back to summary |
|---|---|
| private long currentPosition | |
| randomAccessRead | back to summary |
|---|---|
| private RandomAccessRead randomAccessRead | |
| startPosition | back to summary |
|---|---|
| private final long startPosition | |
| streamLength | back to summary |
|---|---|
| private final long streamLength | |
| RandomAccessReadView | back to summary |
|---|---|
| public RandomAccessReadView(RandomAccessRead randomAccessRead, long startPosition, long streamLength) Constructor.
| |
| RandomAccessReadView | back to summary |
|---|---|
| public RandomAccessReadView(RandomAccessRead randomAccessRead, long startPosition, long streamLength, boolean closeInput) Constructor.
| |
| checkClosed | back to summary |
|---|---|
| private void checkClosed() throws IOException Ensure that that the view isn't closed.
| |
| close | back to summary |
|---|---|
| public void close() throws IOException Implements java. Doc from java. Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect. As noted in
| |
| createView | back to summary |
|---|---|
| public RandomAccessReadView createView(long startPosition, long streamLength) throws IOException Implements org. Doc from org. Creates a random access read view starting at the given position with the given length.
| |
| getPosition | back to summary |
|---|---|
| public long getPosition() throws IOException Implements org. Doc from org. Returns offset of next byte to be returned by a read method.
| |
| isClosed | back to summary |
|---|---|
| public boolean isClosed() Implements org. Doc from org. Returns true if this source has been closed.
| |
| isEOF | back to summary |
|---|---|
| public boolean isEOF() throws IOException Implements org. Doc from org. A simple test to see if we are at the end of the data.
| |
| length | back to summary |
|---|---|
| public long length() throws IOException Implements org. Doc from org. The total number of bytes that are available.
| |
| read | back to summary |
|---|---|
| public int read() throws IOException Implements org. Doc from org. Read a single byte of data.
| |
| read | back to summary |
|---|---|
| public int read(byte[] b, int off, int len) throws IOException Implements org. Doc from org. Read a buffer of data.
| |
| restorePosition | back to summary |
|---|---|
| private void restorePosition() throws IOException Restore the current position within the underlying random access read. | |
| rewind | back to summary |
|---|---|
| public void rewind(int bytes) throws IOException Overrides default org. Doc from org. Seek backwards the given number of bytes.
| |
| seek | back to summary |
|---|---|
| public void seek(final long newOffset) throws IOException Implements org. Doc from org. Seek to a position in the data.
| |