|
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.documents.contents.tokens.Parser
public class Parser
Content stream parser [PDF:1.6:3.7.1].
Constructor Summary | |
---|---|
Parser(PdfDataObject contentStream)
For internal use only. |
Method Summary | |
---|---|
PdfDataObject |
getContentStream()
Gets the content stream on which parsing is done. |
protected static int |
getHex(int c)
|
long |
getLength()
|
long |
getPosition()
|
IInputStream |
getStream()
Gets the current stream. |
int |
getStreamIndex()
Gets the current stream index. |
Object |
getToken()
Gets the currently-parsed token. |
TokenTypeEnum |
getTokenType()
Gets the currently-parsed token type. |
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)
|
ContentObject |
parseContentObject()
Parses the next content object [PDF:1.6:4.1], may it be a single operation or a graphics object. |
List<ContentObject> |
parseContentObjects()
|
Operation |
parseOperation()
|
protected PdfDirectObject |
parsePdfObject()
Parse the current PDF object [PDF:1.6:3.2]. |
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, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Parser(PdfDataObject contentStream)
Method Detail |
---|
protected static int getHex(int c)
protected static boolean isDelimiter(int c)
protected static boolean isEOL(int c)
protected static boolean isWhitespace(int c)
public PdfDataObject getContentStream()
A content stream may be made up of either a single stream or an array of streams.
public long getLength()
public long getPosition()
public IInputStream getStream()
public int getStreamIndex()
public Object getToken()
public TokenTypeEnum getTokenType()
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 ContentObject parseContentObject() throws FileFormatException
FileFormatException
public List<ContentObject> parseContentObjects() throws FileFormatException
FileFormatException
public Operation parseOperation() throws FileFormatException
FileFormatException
protected PdfDirectObject parsePdfObject() throws FileFormatException
FileFormatException
public void seek(long position)
public void skip(long offset)
public boolean skipWhitespace()
|
PDF Clown 0.0.8 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |