public class SeekableBufferedInputStream extends BufferedInputStream implements Seekable
in
Constructor and Description |
---|
SeekableBufferedInputStream(InputStream in,
int size)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
long |
getPos() |
void |
seek(long newPosition)
Moves the starting read position of the stream to the specified position which is relative to
the start of the stream.
|
long |
skip(long n) |
available, close, mark, markSupported, read, read, reset
read
public SeekableBufferedInputStream(InputStream in, int size)
in
- input stream implements seekablesize
- the buffer sizepublic long getPos() throws IOException
getPos
in interface Positioned
IOException
public long skip(long n) throws IOException
skip
in class BufferedInputStream
IOException
public void seek(long newPosition) throws IOException
Seekable
seek
in interface Seekable
newPosition
- the position to seek to, it must be between 0 and the end of the stream - 1IOException
Copyright © 2023. All Rights Reserved.