Class PRTokeniser
java.lang.Object
org.openpdf.text.pdf.PRTokeniser
- All Implemented Interfaces:
AutoCloseable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final boolean[](package private) static final Stringprotected RandomAccessFileOrArrayprotected intprotected booleanprotected intprotected Stringstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbackOnePosition(int ch) voidstatic int[]checkObjectStart(byte[] line) charvoidclose()getFile()intintstatic intgetHex(int v) intintintintintValue()static final booleanisDelimiter(int ch) static final booleanisDelimiterWhitespace(int ch) booleanstatic final booleanisWhitespace(int ch) intlength()booleanvoidintread()booleanreadLineSegment(byte[] input) readString(int size) voidseek(int pos) voidthrowError(String error)
-
Field Details
-
TK_NUMBER
public static final int TK_NUMBER- See Also:
-
TK_STRING
public static final int TK_STRING- See Also:
-
TK_NAME
public static final int TK_NAME- See Also:
-
TK_COMMENT
public static final int TK_COMMENT- See Also:
-
TK_START_ARRAY
public static final int TK_START_ARRAY- See Also:
-
TK_END_ARRAY
public static final int TK_END_ARRAY- See Also:
-
TK_START_DIC
public static final int TK_START_DIC- See Also:
-
TK_END_DIC
public static final int TK_END_DIC- See Also:
-
TK_REF
public static final int TK_REF- See Also:
-
TK_OTHER
public static final int TK_OTHER- See Also:
-
TK_ENDOFFILE
public static final int TK_ENDOFFILE- See Also:
-
delims
public static final boolean[] delims -
EMPTY
- See Also:
-
file
-
type
protected int type -
stringValue
-
reference
protected int reference -
generation
protected int generation -
hexString
protected boolean hexString
-
-
Constructor Details
-
PRTokeniser
- Throws:
IOException
-
PRTokeniser
public PRTokeniser(byte[] pdfIn) -
PRTokeniser
-
-
Method Details
-
isWhitespace
public static final boolean isWhitespace(int ch) -
isDelimiter
public static final boolean isDelimiter(int ch) -
isDelimiterWhitespace
public static final boolean isDelimiterWhitespace(int ch) -
getHex
public static int getHex(int v) -
checkObjectStart
public static int[] checkObjectStart(byte[] line) -
seek
- Throws:
IOException
-
getFilePointer
- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
length
- Throws:
IOException
-
read
- Throws:
IOException
-
getSafeFile
-
getFile
-
readString
- Throws:
IOException
-
getTokenType
public int getTokenType() -
getStringValue
-
getReference
public int getReference() -
getGeneration
public int getGeneration() -
backOnePosition
public void backOnePosition(int ch) -
throwError
- Throws:
IOException
-
checkPdfHeader
- Throws:
IOException
-
checkFdfHeader
- Throws:
IOException
-
getStartxref
- Throws:
IOException
-
nextValidToken
- Throws:
IOException
-
nextToken
- Throws:
IOException
-
intValue
public int intValue() -
readLineSegment
- Throws:
IOException
-
isHexString
public boolean isHexString()
-