Class FixASCIIControlsReader

java.lang.Object
java.io.Reader
java.io.FilterReader
java.io.PushbackReader
com.itextpdf.xmp.impl.FixASCIIControlsReader
All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class FixASCIIControlsReader extends PushbackReader
Since:
22.08.2006
  • Field Details

    • STATE_START

      private static final int STATE_START
      See Also:
    • STATE_AMP

      private static final int STATE_AMP
      See Also:
    • STATE_HASH

      private static final int STATE_HASH
      See Also:
    • STATE_HEX

      private static final int STATE_HEX
      See Also:
    • STATE_DIG1

      private static final int STATE_DIG1
      See Also:
    • STATE_ERROR

      private static final int STATE_ERROR
      See Also:
    • BUFFER_SIZE

      private static final int BUFFER_SIZE
      See Also:
    • state

      private int state
      the state of the automaton
    • control

      private int control
      the result of the escaping sequence
    • digits

      private int digits
      count the digits of the sequence
  • Constructor Details

    • FixASCIIControlsReader

      public FixASCIIControlsReader(Reader in)
      The look-ahead size is 6 at maximum («)
      Parameters:
      in - a Reader
      See Also:
  • Method Details

    • read

      public int read(char[] cbuf, int off, int len) throws IOException
      Overrides:
      read in class PushbackReader
      Throws:
      IOException
      See Also:
    • 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.