Closeable, AutoCloseablepublic class SeekableBufferedStream extends SeekableStream
| Modifier and Type | Field | Description |
|---|---|---|
static int |
DEFAULT_BUFFER_SIZE |
mark| Constructor | Description |
|---|---|
SeekableBufferedStream(SeekableStream stream) |
|
SeekableBufferedStream(SeekableStream stream,
int bufferSize) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
boolean |
eof() |
|
String |
getSource() |
|
long |
length() |
|
long |
position() |
|
int |
read() |
|
int |
read(byte[] buffer,
int offset,
int length) |
|
void |
seek(long position) |
Seeks the stream to the provided position.
|
long |
skip(long skipLength) |
read, readAllBytes, readNBytes, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, mark, markSupported, readFully, resetpublic static final int DEFAULT_BUFFER_SIZE
public SeekableBufferedStream(SeekableStream stream, int bufferSize)
public SeekableBufferedStream(SeekableStream stream)
public long length()
length in class SeekableStreampublic long skip(long skipLength)
throws IOException
skip in class InputStreamIOExceptionpublic void seek(long position)
throws IOException
SeekableStreamseek in class SeekableStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class SeekableStreamIOExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface Closeableclose in class SeekableStreamIOExceptionpublic boolean eof()
throws IOException
eof in class SeekableStreamtrue if the stream is already consumed; false otherwise.IOExceptionpublic String getSource()
getSource in class SeekableStreampublic long position()
throws IOException
position in class SeekableStreamIOException