Package org.apache.xmlgraphics.ps
Class PSDictionary.Maker
- java.lang.Object
-
- org.apache.xmlgraphics.ps.PSDictionary.Maker
-
- Enclosing class:
- PSDictionary
private static class PSDictionary.Maker extends java.lang.Object
This class is used to parse dictionary strings.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
PSDictionary.Maker.Token
Simple token holding class
-
Constructor Summary
Constructors Modifier Constructor Description private
Maker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private int
indexOfMatchingBrace(java.lang.String str, java.lang.String[] braces, int fromIndex)
Returns the closing brace index from a given string searches from a given indexprotected PSDictionary.Maker.Token
nextToken(java.lang.String str, int fromIndex)
Returns a Token containing the start, end index and value of the next token found in a given stringPSDictionary
parseDictionary(java.lang.String str)
Parses a dictionary string and provides a dictionary objectprivate java.lang.String
stripBraces(java.lang.String str, java.lang.String[] braces)
Strips braces from complex object string
-
-
-
Field Detail
-
BRACES
private static final java.lang.String[][] BRACES
-
OPENING
private static final int OPENING
- See Also:
- Constant Field Values
-
CLOSING
private static final int CLOSING
- See Also:
- Constant Field Values
-
DICTIONARY
private static final int DICTIONARY
- See Also:
- Constant Field Values
-
ARRAY
private static final int ARRAY
- See Also:
- Constant Field Values
-
PROCEDURE
private static final int PROCEDURE
- See Also:
- Constant Field Values
-
STRING
private static final int STRING
- See Also:
- Constant Field Values
-
-
Method Detail
-
nextToken
protected PSDictionary.Maker.Token nextToken(java.lang.String str, int fromIndex)
Returns a Token containing the start, end index and value of the next token found in a given string- Parameters:
str
- string to searchfromIndex
- search from index- Returns:
- Token containing the start, end index and value of the next token
-
indexOfMatchingBrace
private int indexOfMatchingBrace(java.lang.String str, java.lang.String[] braces, int fromIndex) throws PSDictionaryFormatException
Returns the closing brace index from a given string searches from a given index- Parameters:
str
- string to searchbraces
- string array of opening and closing bracefromIndex
- searches from index- Returns:
- matching brace index
- Throws:
PSDictionaryFormatException
- thrown in the event that a parsing error occurred
-
stripBraces
private java.lang.String stripBraces(java.lang.String str, java.lang.String[] braces) throws PSDictionaryFormatException
Strips braces from complex object string- Parameters:
str
- String to parsebraces
- String array containing opening and closing braces- Returns:
- String with braces stripped
- Throws:
PSDictionaryFormatException
- thrown in the event that a parsing error occurred
-
parseDictionary
public PSDictionary parseDictionary(java.lang.String str) throws PSDictionaryFormatException
Parses a dictionary string and provides a dictionary object- Parameters:
str
- a dictionary string- Returns:
- A postscript dictionary object
- Throws:
PSDictionaryFormatException
- thrown in the event that a parsing error occurred
-
-