Package com.itextpdf.xmp.impl
Class FixASCIIControlsReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- java.io.PushbackReader
-
- com.itextpdf.xmp.impl.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 sequenceprivate int
digits
count the digits of the sequenceprivate int
state
the state of the automatonprivate 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
-
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)
-
-
-
Field Detail
-
STATE_START
private static final int STATE_START
- See Also:
- Constant Field Values
-
STATE_AMP
private static final int STATE_AMP
- See Also:
- Constant Field Values
-
STATE_HASH
private static final int STATE_HASH
- See Also:
- Constant Field Values
-
STATE_HEX
private static final int STATE_HEX
- See Also:
- Constant Field Values
-
STATE_DIG1
private static final int STATE_DIG1
- See Also:
- Constant Field Values
-
STATE_ERROR
private static final int STATE_ERROR
- See Also:
- Constant Field Values
-
BUFFER_SIZE
private static final int BUFFER_SIZE
- See Also:
- Constant Field Values
-
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
-
-
Method Detail
-
read
public int read(char[] cbuf, int off, int len) throws java.io.IOException
- Overrides:
read
in classjava.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.
-
-