Class UnicodeEscapeProcessingProvider

  • All Implemented Interfaces:
    Provider

    public class UnicodeEscapeProcessingProvider
    extends java.lang.Object
    implements Provider
    Provider un-escaping unicode escape sequences in the input sequence.
    • Method Detail

      • read

        public int read​(char[] buffer,
                        int offset,
                        int len)
                 throws java.io.IOException
        Description copied from interface: Provider
        Reads characters into an array
        Specified by:
        read in interface Provider
        Parameters:
        buffer - Destination buffer
        offset - Offset at which to start storing characters
        len - The maximum possible number of characters to read
        Returns:
        The number of characters read, or -1 if all read
        Throws:
        java.io.IOException
      • close

        public void close()
                   throws java.io.IOException
        Description copied from interface: Provider
        Closes the stream and releases any system resources associated with it.
        Specified by:
        close in interface Provider
        Throws:
        java.io.IOException
      • nextOutputChar

        private int nextOutputChar()
                            throws java.io.IOException
        Produces the next un-escaped character to be written to the output.
        Returns:
        The next character or -1 if no more characters are available.
        Throws:
        java.io.IOException
      • clearBackSlashSeen

        private int clearBackSlashSeen​(int next)
      • backSlashSeen

        private int backSlashSeen()
                           throws java.io.IOException
        Throws:
        java.io.IOException
      • unicodeStartSeen

        private int unicodeStartSeen()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • readDigits

        private int readDigits​(int uCnt,
                               int next3)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • pushBackUs

        private void pushBackUs​(int cnt)
      • digit

        private static int digit​(int ch)
      • nextInputChar

        private int nextInputChar()
                           throws java.io.IOException
        Processes column/line information from the input file.
        Returns:
        The next character or -1 if no more input is available.
        Throws:
        java.io.IOException
      • nextBufferedChar

        private int nextBufferedChar()
                              throws java.io.IOException
        Retrieves the next un-escaped character from the buffered _input.
        Returns:
        The next character or -1 if no more input is available.
        Throws:
        java.io.IOException
      • isBufferEmpty

        private boolean isBufferEmpty()
      • fillBuffer

        private int fillBuffer()
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • pushBack

        private void pushBack​(int ch)