public class PRTokeniser
extends java.lang.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 |
protected int |
generation |
protected boolean |
hexString |
protected int |
reference |
protected java.lang.String |
stringValue |
protected PRTokeniser.TokenType |
type |
Constructor and Description |
---|
PRTokeniser(RandomAccessFileOrArray file)
Creates a PRTokeniser for the specified
RandomAccessSource . |
Modifier and Type | Method and Description |
---|---|
void |
backOnePosition(int ch) |
void |
checkFdfHeader() |
static long[] |
checkObjectStart(byte[] line) |
char |
checkPdfHeader() |
void |
close() |
RandomAccessFileOrArray |
getFile() |
long |
getFilePointer() |
int |
getGeneration() |
int |
getHeaderOffset() |
static int |
getHex(int v) |
int |
getReference() |
RandomAccessFileOrArray |
getSafeFile() |
long |
getStartxref() |
java.lang.String |
getStringValue() |
PRTokeniser.TokenType |
getTokenType() |
int |
intValue() |
static boolean |
isDelimiter(int ch) |
static boolean |
isDelimiterWhitespace(int ch) |
boolean |
isHexString() |
static boolean |
isWhitespace(int ch) |
long |
length() |
long |
longValue() |
boolean |
nextToken() |
void |
nextValidToken() |
int |
read() |
boolean |
readLineSegment(byte[] input) |
java.lang.String |
readString(int size) |
void |
seek(long pos) |
void |
throwError(java.lang.String error) |
public static final boolean[] delims
protected PRTokeniser.TokenType type
protected java.lang.String stringValue
protected int reference
protected int generation
protected boolean hexString
public PRTokeniser(RandomAccessFileOrArray file)
RandomAccessSource
.
The beginning of the file is read to determine the location of the header, and the data source is adjusted
as necessary to account for any junk that occurs in the byte source before the headerbyteSource
- the sourcepublic void seek(long pos) throws java.io.IOException
java.io.IOException
public long getFilePointer() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
java.io.IOException
public long length() throws java.io.IOException
java.io.IOException
public int read() throws java.io.IOException
java.io.IOException
public RandomAccessFileOrArray getSafeFile()
public RandomAccessFileOrArray getFile()
public java.lang.String readString(int size) throws java.io.IOException
java.io.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 java.lang.String getStringValue()
public int getReference()
public int getGeneration()
public void backOnePosition(int ch)
public void throwError(java.lang.String error) throws java.io.IOException
java.io.IOException
public int getHeaderOffset() throws java.io.IOException
java.io.IOException
public char checkPdfHeader() throws java.io.IOException
java.io.IOException
public void checkFdfHeader() throws java.io.IOException
java.io.IOException
public long getStartxref() throws java.io.IOException
java.io.IOException
public static int getHex(int v)
public void nextValidToken() throws java.io.IOException
java.io.IOException
public boolean nextToken() throws java.io.IOException
java.io.IOException
public long longValue()
public int intValue()
public boolean readLineSegment(byte[] input) throws java.io.IOException
java.io.IOException
public static long[] checkObjectStart(byte[] line)
public boolean isHexString()
Copyright © 2013. All Rights Reserved.