Closeable
, AutoCloseable
public 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, transferTo
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
available, mark, markSupported, readFully, reset
public SeekableMemoryStream(byte[] data, String source)
public void close() throws IOException
close
in interface AutoCloseable
close
in interface Closeable
close
in class SeekableStream
IOException
public boolean eof() throws IOException
eof
in class SeekableStream
true
if the stream is already consumed; false
otherwise.IOException
public String getSource()
getSource
in class SeekableStream
public long length()
length
in class SeekableStream
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class SeekableStream
IOException
public void seek(long position) throws IOException
SeekableStream
seek
in class SeekableStream
IOException
public int read() throws IOException
read
in class InputStream
IOException
public long position() throws IOException
position
in class SeekableStream
IOException