public class DecodingReader extends PushbackReader
Modifier and Type | Field and Description |
---|---|
private ByteBuffer |
bbuf |
private CharsetDecoder |
cd |
private CharsetEncoder |
ce |
private static Reader |
staticReader |
private PushbackInputStream |
stream |
in
Constructor and Description |
---|
DecodingReader(InputStream stream,
int size,
Charset cs) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
private boolean |
ensureBbuf(boolean force) |
Charset |
getCharset()
Get the Charset used to decode bytes from the input stream.
|
void |
mark(int readAheadLimit) |
boolean |
markSupported() |
int |
read() |
int |
read(char[] cbuf) |
int |
read(char[] cbuf,
int off,
int len) |
int |
read(CharBuffer cb) |
boolean |
ready() |
void |
reset() |
void |
setCharset(Charset cs)
Change the Charset used to decode bytes from the input stream
into characters.
|
long |
skip(long n)
Skips 'n' characters, or as many as can be read off the stream
before its end.
|
void |
unread(char[] cbuf) |
void |
unread(char[] cbuf,
int off,
int len)
Unread the character array into the reader.
|
void |
unread(int c)
Unread a single code point.
|
private static Reader staticReader
private ByteBuffer bbuf
private PushbackInputStream stream
private CharsetDecoder cd
private CharsetEncoder ce
public DecodingReader(InputStream stream, int size, Charset cs)
public final void setCharset(Charset cs)
public final Charset getCharset()
public final void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class PushbackReader
IOException
public final void mark(int readAheadLimit) throws IOException
mark
in class PushbackReader
IOException
public final boolean markSupported()
markSupported
in class PushbackReader
public final boolean ready() throws IOException
ready
in class PushbackReader
IOException
public final void reset() throws IOException
reset
in class PushbackReader
IOException
public final long skip(long n) throws IOException
skip
in class PushbackReader
IOException
public final void unread(int c) throws IOException
unread
in class PushbackReader
IOException
public final void unread(char[] cbuf, int off, int len) throws IOException
unread
in class PushbackReader
IOException
public final void unread(char[] cbuf) throws IOException
unread
in class PushbackReader
IOException
private boolean ensureBbuf(boolean force) throws IOException
IOException
public final int read() throws IOException
read
in class PushbackReader
IOException
public final int read(char[] cbuf, int off, int len) throws IOException
read
in class PushbackReader
IOException
public final int read(CharBuffer cb) throws IOException
read
in interface Readable
read
in class Reader
IOException
public final int read(char[] cbuf) throws IOException
read
in class Reader
IOException