public class MarkableStream extends FilterInputStream
in| Constructor and Description |
|---|
MarkableStream(InputStream input) |
| Modifier and Type | Method and Description |
|---|---|
void |
mark(int readLimit)
Calls the
in.mark(int) method. |
boolean |
markSupported()
Calls the
in.markSupported() method. |
int |
read()
Calls the
in.read() method |
int |
read(byte[] dest,
int offset,
int count)
Calls the
in.read(byte[], int, int) method. |
void |
reset()
Calls the
in.reset() method. |
long |
skip(long num)
Rewind a Stream created by toRewindableStream().
|
static InputStream |
toMarkableStream(InputStream input) |
available, close, readfinalize, hashCodepublic MarkableStream(InputStream input)
public int read()
throws IOException
FilterInputStreamin.read() methodread in class FilterInputStreamin.read()IOException - If an error occurspublic int read(byte[] dest,
int offset,
int count)
throws IOException
FilterInputStreamin.read(byte[], int, int) method.read in class FilterInputStreamdest - The buffer to read bytes intooffset - The index into the buffer to start storing bytescount - The maximum number of bytes to read.in.read(byte[], int, int)IOException - If an error occurspublic boolean markSupported()
FilterInputStreamin.markSupported() method.markSupported in class FilterInputStreamtrue if mark/reset is supported, false
otherwisepublic void mark(int readLimit)
FilterInputStreamin.mark(int) method.mark in class FilterInputStreamreadLimit - The parameter passed to in.mark(int)public void reset()
throws IOException
FilterInputStreamin.reset() method.reset in class FilterInputStreamIOException - If an error occurspublic static InputStream toMarkableStream(InputStream input)
public long skip(long num)
throws IOException
skip in class FilterInputStreamstream - the RandomStream returned by toRewindableStream().in.skip(long)IOException - if an IO error occurs.