| org.archive.io.SeekInputStream org.archive.io.OriginSeekInputStream
OriginSeekInputStream | public class OriginSeekInputStream extends SeekInputStream (Code) | | Alters the origin of some other SeekInputStream. This class allows you
to completely ignore everything in the underlying stream before a specified
position, the origin position.
With the exception of
OriginSeekInputStream.position() and
position(long) ,
all of the methods in this class simply delegate to the underlying input
stream. The position methods adjust the position of the
underlying stream relative to the origin specified at construction time.
author: pjack |
Method Summary | |
public int | available() | public long | position() Returns the position of the underlying stream relative to the origin. | public void | position(long p) Positions the underlying stream relative to the origin. | public int | read() | public int | read(byte[] buf, int ofs, int len) | public int | read(byte[] buf) | public long | skip(long count) |
OriginSeekInputStream | public OriginSeekInputStream(SeekInputStream input, long origin) throws IOException(Code) | | Constructor.
Parameters: input - the underlying stream Parameters: origin - the origin position throws: IOException - if an IO error occurs |
position | public long position() throws IOException(Code) | | Returns the position of the underlying stream relative to the origin.
the relative position throws: IOException - if an IO error occurs |
position | public void position(long p) throws IOException(Code) | | Positions the underlying stream relative to the origin.
In other words, this.position(0) resolves to input.position(origin),
where input is underlying stream and origin is the origin specified
at construction time.
Parameters: p - the new position for this stream throws: IOException - if an IO error occurs |
|
|