Package com.itextpdf.kernel.xmp.impl
Class FixASCIIControlsReader
- java.lang.Object
-
- java.io.Reader
-
- java.io.FilterReader
-
- java.io.PushbackReader
-
- com.itextpdf.kernel.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 intBUFFER_SIZEprivate intcontrolthe result of the escaping sequenceprivate intdigitscount the digits of the sequenceprivate intstatethe state of the automatonprivate static intSTATE_AMPprivate static intSTATE_DIG1private static intSTATE_ERRORprivate static intSTATE_HASHprivate static intSTATE_HEXprivate static intSTATE_START
-
Constructor Summary
Constructors Constructor Description FixASCIIControlsReader(java.io.Reader input)The look-ahead size is 6 at maximum («)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private charprocessChar(char ch)Processes numeric escaped chars to find out if they are a control character.intread(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:
readin 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.
-
-