|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object it.stefanochizzolini.clown.tokens.Parser
public class Parser
Token parser.
Nested Class Summary | |
---|---|
class |
Parser.Reference
|
Method Summary | |
---|---|
void |
close()
|
protected void |
finalize()
|
long |
getLength()
|
long |
getPosition()
|
IInputStream |
getStream()
|
Object |
getToken()
Gets the currently-parsed token. |
TokenTypeEnum |
getTokenType()
Gets the currently-parsed token type. |
int |
hashCode()
|
protected static boolean |
isDelimiter(int c)
Evaluates whether a character is a delimiter [PDF:1.6:3.1.1]. |
protected static boolean |
isEOL(int c)
Evaluates whether a character is an EOL marker [PDF:1.6:3.1.1]. |
protected static boolean |
isWhitespace(int c)
Evaluates whether a character is a white-space [PDF:1.6:3.1.1]. |
boolean |
moveNext()
Parse the next token [PDF:1.6:3.1]. |
boolean |
moveNext(int offset)
|
PdfDataObject |
parsePdfObject()
Parse the current PDF object [PDF:1.6:3.2]. |
String |
retrieveVersion()
Retrieves the PDF version of the file [PDF:1.6:3.4.1]. |
long |
retrieveXRefOffset()
Retrieves the starting position of the last xref-table section. |
long |
retrieveXRefOffset(long offset)
Retrieves the starting position of an xref-table section [PDF:1.6:3.4.4]. |
void |
seek(long position)
|
void |
skip(long offset)
|
boolean |
skipWhitespace()
Moves to the last whitespace after the current position in order to let read the first non-whitespace. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
protected static boolean isDelimiter(int c)
protected static boolean isEOL(int c)
protected static boolean isWhitespace(int c)
public long getLength()
public long getPosition()
public IInputStream getStream()
public Object getToken()
public TokenTypeEnum getTokenType()
public int hashCode()
hashCode
in class Object
public boolean moveNext(int offset) throws FileFormatException
offset
- Number of tokens to be skipped before reaching the intended one.
FileFormatException
public boolean moveNext() throws FileFormatException
FileFormatException
public PdfDataObject parsePdfObject() throws FileFormatException
FileFormatException
public String retrieveVersion() throws FileFormatException
FileFormatException
public long retrieveXRefOffset() throws FileFormatException
FileFormatException
retrieveXRefOffset(long)
public long retrieveXRefOffset(long offset) throws FileFormatException
offset
- Position of the EOF marker related to the section intended to be parsed.
FileFormatException
public void seek(long position)
public void skip(long offset)
public boolean skipWhitespace()
public void close() throws IOException
close
in interface Closeable
IOException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |