|Constructor and Description|
|Modifier and Type||Method and Description|
Gets the size of the stream.
Gets the current position in the stream.
Seeks to the specified absolute position in the stream.
available, close, mark, markSupported, read, read, read, reset
public long skip(long n) throws IOException
nbytes forward in this stream.
This will not seek past the end of the file. If the current position
is already at or past the end of the file, this doesn't seek at all
0. Otherwise, if skipping
would cause the position to exceed the stream size, this will do
seek(length()) and the return value will
be adjusted accordingly.
n is negative, the position isn't changed and
the return value is
0. It doesn't seek backward
because it would conflict with the specification of
public abstract long length() throws IOException
public abstract long position() throws IOException
public abstract void seek(long pos) throws IOException
Seeking past the end of the file should be supported by the subclasses
unless there is a good reason to do otherwise. If one has seeked
past the end of the stream,
read will return
-1 to indicate end of stream.
pos- new read position in the stream
posis negative or if a stream-specific I/O error occurs