Closeable, AutoCloseablepublic class SeekableMemoryStream extends SeekableStream
mark| Constructor | Description |
|---|---|
SeekableMemoryStream(byte[] data,
String source) |
| 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.
|
read, readAllBytes, readNBytes, skip, transferToclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitavailable, mark, markSupported, readFully, resetpublic SeekableMemoryStream(byte[] data,
String source)
public 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 length()
length in class SeekableStreampublic int read(byte[] buffer,
int offset,
int length)
throws IOException
read in class SeekableStreamIOExceptionpublic void seek(long position)
throws IOException
SeekableStreamseek in class SeekableStreamIOExceptionpublic int read()
throws IOException
read in class InputStreamIOExceptionpublic long position()
throws IOException
position in class SeekableStreamIOException