Class AbstractCharDecoder

    • Field Summary

      Fields 
      Modifier and Type Field 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.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractCharDecoder​(java.io.InputStream is)
      Creates a new CharDecoder object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • inputStream

        protected java.io.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 Detail

      • AbstractCharDecoder

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

      • dispose

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

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

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

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