public class RewindableReader extends Reader
Reader and
allows to rewind these. As soon as more than size characters have been read,
rewinding fails.| Modifier and Type | Field and Description |
|---|---|
protected char[] |
buffer |
protected int |
pos |
protected boolean |
rewindable |
protected PushbackReader |
wrappedReader |
| Constructor and Description |
|---|
RewindableReader(Reader input,
int size) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
getCurrentRewindableCapacity() |
int |
getRewindBufferSize() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(char[] cbuf,
int off,
int len) |
void |
reset() |
void |
rewind()
Rewinds the reader such that the initial characters are returned when invoking read().
|
long |
skip(long n) |
protected PushbackReader wrappedReader
protected char[] buffer
protected int pos
protected boolean rewindable
public RewindableReader(Reader input, int size)
public int read(char[] cbuf,
int off,
int len)
throws IOException
read in class ReaderIOExceptionpublic int read()
throws IOException
read in class ReaderIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class ReaderIOExceptionpublic void mark(int readlimit)
throws IOException
mark in class ReaderIOExceptionpublic boolean markSupported()
markSupported in class Readerpublic void reset()
throws IOException
reset in class ReaderIOExceptionpublic long skip(long n)
throws IOException
skip in class ReaderIOExceptionpublic void rewind()
throws IOException
IOExceptionpublic int getRewindBufferSize()
public int getCurrentRewindableCapacity()
Copyright © 2014–2020 Camunda Services GmbH. All rights reserved.