Class AbstractCharDecoder

java.lang.Object
org.apache.batik.util.io.AbstractCharDecoder
All Implemented Interfaces:
CharDecoder
Direct Known Subclasses:
ASCIIDecoder, ISO_8859_1Decoder, UTF16Decoder, UTF8Decoder

public abstract class AbstractCharDecoder extends Object implements CharDecoder
This class is the superclass of all the char decoders.
  • Field Details

    • BUFFER_SIZE

      protected static final int BUFFER_SIZE
      The buffer size.
      See Also:
    • inputStream

      protected InputStream inputStream
      The input stream to read.
    • buffer

      protected byte[] buffer
      The input buffer.
    • position

      protected int position
      The current position in the buffer.
    • count

      protected int count
      The byte count in the buffer.
  • Constructor Details

    • AbstractCharDecoder

      protected AbstractCharDecoder(InputStream is)
      Creates a new CharDecoder object.
      Parameters:
      is - The stream to read.
  • Method Details

    • dispose

      public void dispose() throws IOException
      Disposes the associated resources.
      Specified by:
      dispose in interface CharDecoder
      Throws:
      IOException
    • fillBuffer

      protected void fillBuffer() throws IOException
      Fills the input buffer.
      Throws:
      IOException
    • charError

      protected void charError(String encoding) throws IOException
      To throws an exception when the input stream contains an invalid character.
      Parameters:
      encoding - The encoding name.
      Throws:
      IOException
    • endOfStreamError

      protected void endOfStreamError(String encoding) throws IOException
      To throws an exception when the end of stream was unexpected.
      Parameters:
      encoding - The encoding name.
      Throws:
      IOException