Closeable, AutoCloseablepublic class SeekablePathStream extends SeekableStream
SeekableStream for Path.mark| Constructor | Description |
|---|---|
SeekablePathStream(Path path) |
|
SeekablePathStream(Path path,
Function<SeekableByteChannel,SeekableByteChannel> wrapper) |
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
static void |
closeAllInstances() |
|
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 n) |
read, readAllBytes, readNBytes, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, mark, markSupported, readFully, resetpublic SeekablePathStream(Path path) throws IOException
IOExceptionpublic SeekablePathStream(Path path, Function<SeekableByteChannel,SeekableByteChannel> wrapper) throws IOException
IOExceptionpublic long length()
length in class SeekableStreampublic boolean eof()
throws IOException
eof in class SeekableStreamtrue if the stream is already consumed; false otherwise.IOExceptionpublic void seek(long position)
throws IOException
SeekableStreamseek in class SeekableStreamIOExceptionpublic long position()
throws IOException
position in class SeekableStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class InputStreamIOExceptionpublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class SeekableStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic String getSource()
getSource in class SeekableStreampublic void close()
throws IOException
close in interface AutoCloseableclose in interface Closeableclose in class SeekableStreamIOExceptionpublic static void closeAllInstances()