Class FixASCIIControlsReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Readable

    public class FixASCIIControlsReader
    extends java.io.PushbackReader
    Since:
    22.08.2006
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int BUFFER_SIZE  
      private int control
      the result of the escaping sequence
      private int digits
      count the digits of the sequence
      private int state
      the state of the automaton
      private static int STATE_AMP  
      private static int STATE_DIG1  
      private static int STATE_ERROR  
      private static int STATE_HASH  
      private static int STATE_HEX  
      private static int STATE_START  
      • Fields inherited from class java.io.FilterReader

        in
      • Fields inherited from class java.io.Reader

        lock
    • Constructor Summary

      Constructors 
      Constructor Description
      FixASCIIControlsReader​(java.io.Reader in)
      The look-ahead size is 6 at maximum («)
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private char processChar​(char ch)
      Processes numeric escaped chars to find out if they are a control character.
      int read​(char[] cbuf, int off, int len)  
      • Methods inherited from class java.io.PushbackReader

        close, mark, markSupported, read, ready, reset, skip, unread, unread, unread
      • Methods inherited from class java.io.Reader

        nullReader, read, read, transferTo
      • Methods inherited from class java.lang.Object

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

      • FixASCIIControlsReader

        public FixASCIIControlsReader​(java.io.Reader in)
        The look-ahead size is 6 at maximum («)
        Parameters:
        in - a Reader
        See Also:
        PushbackReader(Reader, int)
    • Method Detail

      • read

        public int read​(char[] cbuf,
                        int off,
                        int len)
                 throws java.io.IOException
        Overrides:
        read in class java.io.PushbackReader
        Throws:
        java.io.IOException
        See Also:
        Reader.read(char[], int, int)
      • processChar

        private char processChar​(char ch)
        Processes numeric escaped chars to find out if they are a control character.
        Parameters:
        ch - a char
        Returns:
        Returns the char directly or as replacement for the escaped sequence.