org.apache.batik.util.io

Class AbstractCharDecoder

public abstract class AbstractCharDecoder extends Object implements CharDecoder

This class is the superclass of all the char decoders.
Field Summary
protected byte[]buffer
The input buffer.
protected static intBUFFER_SIZE
The buffer size.
protected intcount
The byte count in the buffer.
protected InputStreaminputStream
The input stream to read.
protected intposition
The current position in the buffer.
Constructor Summary
protected AbstractCharDecoder(InputStream is)
Creates a new CharDecoder object.
Method Summary
protected voidcharError(String encoding)
To throws an exception when the input stream contains an invalid character.
voiddispose()
Disposes the associated resources.
protected voidendOfStreamError(String encoding)
To throws an exception when the end of stream was unexpected.
protected voidfillBuffer()
Fills the input buffer.

Field Detail

buffer

protected byte[] buffer
The input buffer.

BUFFER_SIZE

protected static final int BUFFER_SIZE
The buffer size.

count

protected int count
The byte count in the buffer.

inputStream

protected InputStream inputStream
The input stream to read.

position

protected int position
The current position in the buffer.

Constructor Detail

AbstractCharDecoder

protected AbstractCharDecoder(InputStream is)
Creates a new CharDecoder object.

Parameters: is The stream to read.

Method Detail

charError

protected void charError(String encoding)
To throws an exception when the input stream contains an invalid character.

Parameters: encoding The encoding name.

dispose

public void dispose()
Disposes the associated resources.

endOfStreamError

protected void endOfStreamError(String encoding)
To throws an exception when the end of stream was unexpected.

Parameters: encoding The encoding name.

fillBuffer

protected void fillBuffer()
Fills the input buffer.
Copyright B) 2008 Apache Software Foundation. All Rights Reserved.