public abstract class AbstractCharDecoder extends Object implements CharDecoder
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
buffer
The input buffer.
|
protected static int |
BUFFER_SIZE
The buffer size.
|
protected int |
count
The byte count in the buffer.
|
protected InputStream |
inputStream
The input stream to read.
|
protected int |
position
The current position in the buffer.
|
END_OF_STREAM| Modifier | Constructor and Description |
|---|---|
protected |
AbstractCharDecoder(InputStream is)
Creates a new CharDecoder object.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
charError(String encoding)
To throws an exception when the input stream contains an
invalid character.
|
void |
dispose()
Disposes the associated resources.
|
protected void |
endOfStreamError(String encoding)
To throws an exception when the end of stream was unexpected.
|
protected void |
fillBuffer()
Fills the input buffer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadCharprotected static final int BUFFER_SIZE
protected InputStream inputStream
protected byte[] buffer
protected int position
protected int count
protected AbstractCharDecoder(InputStream is)
is - The stream to read.public void dispose()
throws IOException
dispose in interface CharDecoderIOExceptionprotected void fillBuffer()
throws IOException
IOExceptionprotected void charError(String encoding) throws IOException
encoding - The encoding name.IOExceptionprotected void endOfStreamError(String encoding) throws IOException
encoding - The encoding name.IOExceptionCopyright © 2000–2017 Apache Software Foundation. All rights reserved.