public abstract class PostscriptParser.PSElement
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.util.LinkedHashMap<java.lang.String,int[]> |
binaryEntries |
protected int |
endPoint |
protected boolean |
hasMore |
protected java.lang.String |
operator |
protected boolean |
readBinary |
protected java.util.List<java.lang.String> |
tokens |
Constructor and Description |
---|
PSElement(java.lang.String operator,
int startPoint) |
Modifier and Type | Method and Description |
---|---|
java.util.LinkedHashMap<java.lang.String,int[]> |
getBinaryEntries() |
int[] |
getBinaryEntryByIndex(int index)
Gets the binary entry location of a given index from the array
|
int |
getEndPoint()
The end location of the element within the source binary data
|
boolean |
getFoundUnexpected()
Returns whether unexpected postscript has been found in the element
|
java.lang.String |
getOperator()
Gets the Postscript element operator
|
int |
getStartPoint()
The start location of the element within the source binary data
|
boolean |
hasMore()
Determines if more data is still to be parsed for the Postscript element.
|
protected boolean |
isInteger(java.lang.String intValue) |
void |
parse(byte cur,
int pos)
Takes over the task of tokenizing the byte data
|
abstract void |
parseByte(byte cur,
int pos)
Passes responsibility for processing the byte stream to the PostScript object
|
abstract void |
parseToken(java.lang.String token,
int curPos)
Delegates the parse routine to a sub class
|
protected void |
setFoundUnexpected(boolean foundUnexpected)
Sets a value to be true if an expected entry postscript is found in the element.
|
protected java.lang.String operator
protected boolean hasMore
protected java.util.LinkedHashMap<java.lang.String,int[]> binaryEntries
protected java.util.List<java.lang.String> tokens
protected boolean readBinary
protected int endPoint
public java.lang.String getOperator()
public int getStartPoint()
public int getEndPoint()
public void parse(byte cur, int pos) throws java.io.UnsupportedEncodingException
cur
- The current byte being readjava.io.UnsupportedEncodingException
public abstract void parseByte(byte cur, int pos)
cur
- The byte currently being readpos
- The position of the given bytepublic abstract void parseToken(java.lang.String token, int curPos)
token
- The token which to parseprotected boolean isInteger(java.lang.String intValue)
public java.util.LinkedHashMap<java.lang.String,int[]> getBinaryEntries()
public int[] getBinaryEntryByIndex(int index)
index
- The index for which to retrieve the binary data locationpublic boolean hasMore()
protected void setFoundUnexpected(boolean foundUnexpected)
foundUnexpected
- true if unexpected postscript is found.public boolean getFoundUnexpected()
Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.