public class PRTokeniser extends Object
Modifier and Type | Class and Description |
---|---|
static class |
PRTokeniser.TokenType
Enum representing the possible token types
|
Modifier and Type | Field and Description |
---|---|
static boolean[] |
delims |
(package private) static String |
EMPTY |
protected RandomAccessFileOrArray |
file |
protected int |
generation |
protected boolean |
hexString |
protected int |
reference |
protected String |
stringValue |
protected PRTokeniser.TokenType |
type |
Constructor and Description |
---|
PRTokeniser(byte[] pdfIn) |
PRTokeniser(RandomAccessFileOrArray file) |
PRTokeniser(String filename) |
Modifier and Type | Method and Description |
---|---|
void |
backOnePosition(int ch) |
void |
checkFdfHeader() |
static int[] |
checkObjectStart(byte[] line) |
char |
checkPdfHeader() |
void |
close() |
RandomAccessFileOrArray |
getFile() |
int |
getFilePointer() |
int |
getGeneration() |
static int |
getHex(int v) |
int |
getReference() |
RandomAccessFileOrArray |
getSafeFile() |
int |
getStartxref(int arrLength) |
String |
getStringValue() |
PRTokeniser.TokenType |
getTokenType() |
int |
intValue() |
static boolean |
isDelimiter(int ch) |
static boolean |
isDelimiterWhitespace(int ch) |
boolean |
isHexString() |
static boolean |
isWhitespace(int ch) |
int |
length() |
boolean |
nextToken() |
void |
nextValidToken() |
int |
read() |
boolean |
readLineSegment(byte[] input) |
String |
readString(int size) |
void |
seek(int pos) |
void |
throwError(String error) |
public static final boolean[] delims
static final String EMPTY
protected RandomAccessFileOrArray file
protected PRTokeniser.TokenType type
protected String stringValue
protected int reference
protected int generation
protected boolean hexString
public PRTokeniser(String filename) throws IOException
IOException
public PRTokeniser(byte[] pdfIn)
public PRTokeniser(RandomAccessFileOrArray file)
public void seek(int pos) throws IOException
IOException
public int getFilePointer() throws IOException
IOException
public void close() throws IOException
IOException
public int length() throws IOException
IOException
public int read() throws IOException
IOException
public RandomAccessFileOrArray getSafeFile()
public RandomAccessFileOrArray getFile()
public String readString(int size) throws IOException
IOException
public static final boolean isWhitespace(int ch)
public static final boolean isDelimiter(int ch)
public static final boolean isDelimiterWhitespace(int ch)
public PRTokeniser.TokenType getTokenType()
public String getStringValue()
public int getReference()
public int getGeneration()
public void backOnePosition(int ch)
public void throwError(String error) throws IOException
IOException
public char checkPdfHeader() throws IOException
IOException
public void checkFdfHeader() throws IOException
IOException
public int getStartxref(int arrLength) throws IOException
IOException
public static int getHex(int v)
public void nextValidToken() throws IOException
IOException
public boolean nextToken() throws IOException
IOException
public int intValue()
public boolean readLineSegment(byte[] input) throws IOException
IOException
public static int[] checkObjectStart(byte[] line)
public boolean isHexString()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses