public class OriginSeekInputStream extends SeekInputStream
With the exception of 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.
| Constructor and Description |
|---|
OriginSeekInputStream(SeekInputStream input,
long origin)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
long |
position()
Returns the position of the underlying stream relative to the origin.
|
void |
position(long p)
Positions the underlying stream relative to the origin.
|
int |
read() |
int |
read(byte[] buf) |
int |
read(byte[] buf,
int ofs,
int len) |
long |
skip(long count) |
mark, markSupported, resetclosepublic OriginSeekInputStream(SeekInputStream input, long origin) throws IOException
input - the underlying streamorigin - the origin positionIOException - if an IO error occurspublic int available()
throws IOException
available in class InputStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf,
int ofs,
int len)
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buf)
throws IOException
read in class InputStreamIOExceptionpublic long skip(long count)
throws IOException
skip in class InputStreamIOExceptionpublic long position()
throws IOException
IOException - if an IO error occurspublic void position(long p)
throws IOException
p - the new position for this streamIOException - if an IO error occursCopyright © 2015 The International Internet Preservation Consortium. All Rights Reserved.