public abstract class AbstractCharDecoder extends java.lang.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 java.io.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(java.io.InputStream is)
Creates a new CharDecoder object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
charError(java.lang.String encoding)
To throws an exception when the input stream contains an
invalid character.
|
void |
dispose()
Disposes the associated resources.
|
protected void |
endOfStreamError(java.lang.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 java.io.InputStream inputStream
protected byte[] buffer
protected int position
protected int count
protected AbstractCharDecoder(java.io.InputStream is)
is
- The stream to read.public void dispose() throws java.io.IOException
dispose
in interface CharDecoder
java.io.IOException
protected void fillBuffer() throws java.io.IOException
java.io.IOException
protected void charError(java.lang.String encoding) throws java.io.IOException
encoding
- The encoding name.java.io.IOException
protected void endOfStreamError(java.lang.String encoding) throws java.io.IOException
encoding
- The encoding name.java.io.IOException
Copyright © 2022 Apache Software Foundation. All Rights Reserved.