Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jempeg.empeg.core
Class SeekableInputStream  view SeekableInputStream download SeekableInputStream.java

java.lang.Object
  extended byjava.io.InputStream
      extended byorg.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 $

Constructor Summary
SeekableInputStream()
           
 
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.io.InputStream
available, close, mark, markSupported, read, read, read, reset, skip
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SeekableInputStream

public SeekableInputStream()
Method Detail

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.