java.lang.Object
java.io.InputStream
org.jempeg.empeg.core.SeekableInputStream
- All Implemented Interfaces:
- java.io.Closeable
- Direct Known Subclasses:
- FileSeekableInputStream, MemorySeekableInputStream
- public abstract class SeekableInputStream
- extends java.io.InputStream
SeekableInputStream is a Stream implementation
that provides random access to the underlying
data source.
- Version:
- $Revision: 1.2 $
|
Method Summary |
abstract long |
length()
Returns the length of this stream. |
void |
readFully(byte[] _buffer)
Reads _buffer.length bytes into the buffer starting at 0. |
void |
readFully(byte[] _buffer,
int _pos,
int _length)
Reads _length bytes into the buffer starting at _pos. |
abstract void |
seek(long _position)
Seeks to the given position in the stream. |
abstract long |
tell()
Returns the current position in the stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SeekableInputStream
public SeekableInputStream()
tell
public abstract long tell()
throws java.io.IOException
- Returns the current position in the stream.
seek
public abstract void seek(long _position)
throws java.io.IOException
- Seeks to the given position in the stream.
length
public abstract long length()
throws java.io.IOException
- Returns the length of this stream.
readFully
public void readFully(byte[] _buffer,
int _pos,
int _length)
throws java.io.IOException
- Reads _length bytes into the buffer starting at _pos.
readFully
public void readFully(byte[] _buffer)
throws java.io.IOException
- Reads _buffer.length bytes into the buffer starting at 0.