|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.pdfclown.util.parsers.PostScriptParser
public class PostScriptParser
PostScript (non-procedural subset) parser [PS].
Nested Class Summary | |
---|---|
static class |
PostScriptParser.TokenTypeEnum
|
Constructor Summary | |
---|---|
PostScriptParser(byte[] data)
|
|
PostScriptParser(IInputStream stream)
|
Method Summary | |
---|---|
void |
close()
|
protected void |
finalize()
|
protected static int |
getHex(int c)
|
long |
getLength()
|
long |
getPosition()
|
IInputStream |
getStream()
|
Object |
getToken()
Gets the currently-parsed token. |
Object |
getToken(int offset)
Gets a token after moving to the given offset. |
PostScriptParser.TokenTypeEnum |
getTokenType()
Gets the currently-parsed token type. |
int |
hashCode()
|
protected static boolean |
isDelimiter(int c)
Evaluates whether a character is a delimiter. |
protected static boolean |
isEOL(int c)
Evaluates whether a character is an EOL marker. |
protected static boolean |
isWhitespace(int c)
Evaluates whether a character is a white-space. |
boolean |
moveNext()
Moves the pointer to the next token. |
boolean |
moveNext(int offset)
Moves the pointer to the token at the given offset. |
void |
seek(long position)
Moves the pointer to the given absolute byte position. |
protected void |
setToken(Object value)
|
protected void |
setTokenType(PostScriptParser.TokenTypeEnum value)
|
void |
skip(long offset)
Moves the pointer to the given relative byte position. |
boolean |
skipEOL()
Moves the pointer before the next non-EOL character after the current position. |
boolean |
skipWhitespace()
Moves the pointer before the next non-whitespace character after the current position. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PostScriptParser(IInputStream stream)
public PostScriptParser(byte[] data)
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 long getLength()
public long getPosition()
public IInputStream getStream()
public Object getToken()
public Object getToken(int offset)
offset
- Number of tokens to skip before reaching the intended one.getToken()
public PostScriptParser.TokenTypeEnum getTokenType()
public int hashCode()
hashCode
in class Object
public boolean moveNext(int offset)
offset
- Number of tokens to skip before reaching the intended one.
public boolean moveNext()
To properly parse the current token, the pointer MUST be just before its starting (leading whitespaces are ignored). When this method terminates, the pointer IS at the last byte of the current token.
public void seek(long position)
public void skip(long offset)
public boolean skipEOL()
public boolean skipWhitespace()
public void close() throws IOException
close
in interface Closeable
IOException
protected void finalize() throws Throwable
finalize
in class Object
Throwable
protected void setToken(Object value)
protected void setTokenType(PostScriptParser.TokenTypeEnum value)
|
PDF Clown 0.1.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |