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, resetpublic OriginSeekInputStream(SeekInputStream input, long origin) throws java.io.IOException
input - the underlying streamorigin - the origin positionjava.io.IOException - if an IO error occurspublic int available()
throws java.io.IOException
available in class java.io.InputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf,
int ofs,
int len)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] buf)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long skip(long count)
throws java.io.IOException
skip in class java.io.InputStreamjava.io.IOExceptionpublic long position()
throws java.io.IOException
java.io.IOException - if an IO error occurspublic void position(long p)
throws java.io.IOException
p - the new position for this streamjava.io.IOException - if an IO error occursCopyright © 2019 The International Internet Preservation Consortium. All Rights Reserved.