public class SeekableMemoryStream extends SeekableStream
mark| Constructor and Description |
|---|
SeekableMemoryStream(byte[] data,
java.lang.String source) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
boolean |
eof() |
java.lang.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.
|
available, mark, markSupported, readFully, resetpublic SeekableMemoryStream(byte[] data,
java.lang.String source)
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class SeekableStreamjava.io.IOExceptionpublic boolean eof()
throws java.io.IOException
eof in class SeekableStreamtrue if the stream is already consumed; false otherwise.java.io.IOExceptionpublic java.lang.String getSource()
getSource in class SeekableStreampublic long length()
length in class SeekableStreampublic int read(byte[] buffer,
int offset,
int length)
throws java.io.IOException
read in class SeekableStreamjava.io.IOExceptionpublic void seek(long position)
throws java.io.IOException
SeekableStreamseek in class SeekableStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic long position()
throws java.io.IOException
position in class SeekableStreamjava.io.IOException