com.lowagie.text.pdf

Class PRTokeniser

public class PRTokeniser extends Object

Author: Paulo Soares (psoares@consiste.pt)

Field Summary
static boolean[]delims
static StringEMPTY
protected RandomAccessFileOrArrayfile
protected intgeneration
protected booleanhexString
protected intreference
protected StringstringValue
protected inttype
static intTK_COMMENT
static intTK_END_ARRAY
static intTK_END_DIC
static intTK_NAME
static intTK_NUMBER
static intTK_OTHER
static intTK_REF
static intTK_START_ARRAY
static intTK_START_DIC
static intTK_STRING
Constructor Summary
PRTokeniser(String filename)
PRTokeniser(byte[] pdfIn)
PRTokeniser(RandomAccessFileOrArray file)
Method Summary
voidbackOnePosition(int ch)
voidcheckFdfHeader()
static int[]checkObjectStart(byte[] line)
charcheckPdfHeader()
voidclose()
RandomAccessFileOrArraygetFile()
intgetFilePointer()
intgetGeneration()
static intgetHex(int v)
intgetReference()
RandomAccessFileOrArraygetSafeFile()
intgetStartxref()
StringgetStringValue()
intgetTokenType()
intintValue()
static booleanisDelimiter(int ch)
static booleanisDelimiterWhitespace(int ch)
booleanisHexString()
static booleanisWhitespace(int ch)
intlength()
booleannextToken()
voidnextValidToken()
intread()
booleanreadLineSegment(byte[] input)
StringreadString(int size)
voidseek(int pos)
voidthrowError(String error)

Field Detail

delims

public static final boolean[] delims

EMPTY

static final String EMPTY

file

protected RandomAccessFileOrArray file

generation

protected int generation

hexString

protected boolean hexString

reference

protected int reference

stringValue

protected String stringValue

type

protected int type

TK_COMMENT

public static final int TK_COMMENT

TK_END_ARRAY

public static final int TK_END_ARRAY

TK_END_DIC

public static final int TK_END_DIC

TK_NAME

public static final int TK_NAME

TK_NUMBER

public static final int TK_NUMBER

TK_OTHER

public static final int TK_OTHER

TK_REF

public static final int TK_REF

TK_START_ARRAY

public static final int TK_START_ARRAY

TK_START_DIC

public static final int TK_START_DIC

TK_STRING

public static final int TK_STRING

Constructor Detail

PRTokeniser

public PRTokeniser(String filename)

PRTokeniser

public PRTokeniser(byte[] pdfIn)

PRTokeniser

public PRTokeniser(RandomAccessFileOrArray file)

Method Detail

backOnePosition

public void backOnePosition(int ch)

checkFdfHeader

public void checkFdfHeader()

checkObjectStart

public static int[] checkObjectStart(byte[] line)

checkPdfHeader

public char checkPdfHeader()

close

public void close()

getFile

public RandomAccessFileOrArray getFile()

getFilePointer

public int getFilePointer()

getGeneration

public int getGeneration()

getHex

public static int getHex(int v)

getReference

public int getReference()

getSafeFile

public RandomAccessFileOrArray getSafeFile()

getStartxref

public int getStartxref()

getStringValue

public String getStringValue()

getTokenType

public int getTokenType()

intValue

public int intValue()

isDelimiter

public static final boolean isDelimiter(int ch)

isDelimiterWhitespace

public static final boolean isDelimiterWhitespace(int ch)

isHexString

public boolean isHexString()

isWhitespace

public static final boolean isWhitespace(int ch)

length

public int length()

nextToken

public boolean nextToken()

nextValidToken

public void nextValidToken()

read

public int read()

readLineSegment

public boolean readLineSegment(byte[] input)

readString

public String readString(int size)

seek

public void seek(int pos)

throwError

public void throwError(String error)