Package com.aowagie.text.pdf
Class PRTokeniser
- java.lang.Object
-
- com.aowagie.text.pdf.PRTokeniser
-
public class PRTokeniser extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static boolean[]delimsprivate static java.lang.StringEMPTYprivate RandomAccessFileOrArrayfileprivate intgenerationprivate booleanhexStringprivate intreferenceprivate java.lang.StringstringValue(package private) static intTK_COMMENT(package private) static intTK_END_ARRAY(package private) static intTK_END_DIC(package private) static intTK_NAME(package private) static intTK_NUMBER(package private) static intTK_OTHER(package private) static intTK_REF(package private) static intTK_START_ARRAY(package private) static intTK_START_DIC(package private) static intTK_STRINGprivate inttype
-
Constructor Summary
Constructors Constructor Description PRTokeniser(byte[] pdfIn)PRTokeniser(RandomAccessFileOrArray file)PRTokeniser(java.lang.String filename)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidbackOnePosition(int ch)(package private) voidcheckFdfHeader()(package private) static int[]checkObjectStart(byte[] line)(package private) charcheckPdfHeader()(package private) voidclose()RandomAccessFileOrArraygetFile()intgetFilePointer()intgetGeneration()static intgetHex(int v)intgetReference()RandomAccessFileOrArraygetSafeFile()intgetStartxref()java.lang.StringgetStringValue()intgetTokenType()(package private) intintValue()booleanisHexString()(package private) static booleanisWhitespace(int ch)(package private) intlength()(package private) booleannextToken()(package private) voidnextValidToken()intread()(package private) booleanreadLineSegment(byte[] input)(package private) java.lang.StringreadString(int size)voidseek(int pos)(package private) voidthrowError(java.lang.String error)
-
-
-
Field Detail
-
TK_NUMBER
static final int TK_NUMBER
- See Also:
- Constant Field Values
-
TK_STRING
static final int TK_STRING
- See Also:
- Constant Field Values
-
TK_NAME
static final int TK_NAME
- See Also:
- Constant Field Values
-
TK_COMMENT
static final int TK_COMMENT
- See Also:
- Constant Field Values
-
TK_START_ARRAY
static final int TK_START_ARRAY
- See Also:
- Constant Field Values
-
TK_END_ARRAY
static final int TK_END_ARRAY
- See Also:
- Constant Field Values
-
TK_START_DIC
static final int TK_START_DIC
- See Also:
- Constant Field Values
-
TK_END_DIC
static final int TK_END_DIC
- See Also:
- Constant Field Values
-
TK_REF
static final int TK_REF
- See Also:
- Constant Field Values
-
TK_OTHER
static final int TK_OTHER
- See Also:
- Constant Field Values
-
delims
private static final boolean[] delims
-
EMPTY
private static final java.lang.String EMPTY
- See Also:
- Constant Field Values
-
file
private final RandomAccessFileOrArray file
-
type
private int type
-
stringValue
private java.lang.String stringValue
-
reference
private int reference
-
generation
private int generation
-
hexString
private boolean hexString
-
-
Constructor Detail
-
PRTokeniser
PRTokeniser(java.lang.String filename) throws java.io.IOException- Throws:
java.io.IOException
-
PRTokeniser
public PRTokeniser(byte[] pdfIn)
-
PRTokeniser
PRTokeniser(RandomAccessFileOrArray file)
-
-
Method Detail
-
seek
public void seek(int pos) throws java.io.IOException- Throws:
java.io.IOException
-
getFilePointer
public int getFilePointer() throws java.io.IOException- Throws:
java.io.IOException
-
close
void close() throws java.io.IOException- Throws:
java.io.IOException
-
length
int length() throws java.io.IOException- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Throws:
java.io.IOException
-
getSafeFile
public RandomAccessFileOrArray getSafeFile()
-
getFile
public RandomAccessFileOrArray getFile()
-
readString
java.lang.String readString(int size) throws java.io.IOException- Throws:
java.io.IOException
-
isWhitespace
static final boolean isWhitespace(int ch)
-
getTokenType
public int getTokenType()
-
getStringValue
public java.lang.String getStringValue()
-
getReference
public int getReference()
-
getGeneration
public int getGeneration()
-
backOnePosition
void backOnePosition(int ch)
-
throwError
void throwError(java.lang.String error) throws java.io.IOException- Throws:
java.io.IOException
-
checkPdfHeader
char checkPdfHeader() throws java.io.IOException- Throws:
java.io.IOException
-
checkFdfHeader
void checkFdfHeader() throws java.io.IOException- Throws:
java.io.IOException
-
getStartxref
public int getStartxref() throws java.io.IOException- Throws:
java.io.IOException
-
getHex
public static int getHex(int v)
-
nextValidToken
void nextValidToken() throws java.io.IOException- Throws:
java.io.IOException
-
nextToken
boolean nextToken() throws java.io.IOException- Throws:
java.io.IOException
-
intValue
int intValue()
-
readLineSegment
boolean readLineSegment(byte[] input) throws java.io.IOException- Throws:
java.io.IOException
-
checkObjectStart
static int[] checkObjectStart(byte[] line)
-
isHexString
public boolean isHexString()
-
-