public abstract class PostscriptParser.PSElement extends Object
Modifier and Type | Field and Description |
---|---|
protected LinkedHashMap<String,int[]> |
binaryEntries |
protected int |
endPoint |
protected boolean |
hasMore |
protected String |
operator |
protected boolean |
readBinary |
protected List<String> |
tokens |
Constructor and Description |
---|
PSElement(String operator,
int startPoint) |
Modifier and Type | Method and Description |
---|---|
LinkedHashMap<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
|
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(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(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 String operator
protected boolean hasMore
protected LinkedHashMap<String,int[]> binaryEntries
protected boolean readBinary
protected int endPoint
public PSElement(String operator, int startPoint)
public String getOperator()
public int getStartPoint()
public int getEndPoint()
public void parse(byte cur, int pos) throws UnsupportedEncodingException
cur
- The current byte being readUnsupportedEncodingException
public abstract void parseByte(byte cur, int pos)
cur
- The byte currently being readpos
- The position of the given bytepublic abstract void parseToken(String token, int curPos)
token
- The token which to parseprotected boolean isInteger(String intValue)
public LinkedHashMap<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 © 2025 Apache Software Foundation. All rights reserved.