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, wait
readChar
protected 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 CharDecoder
IOException
protected void fillBuffer() throws IOException
IOException
protected void charError(String encoding) throws IOException
encoding
- The encoding name.IOException
protected void endOfStreamError(String encoding) throws IOException
encoding
- The encoding name.IOException
Copyright © 2000–2023 Apache Software Foundation. All rights reserved.