public class CMapContentParser extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
COMMAND_TYPE
Commands have this type.
|
| Constructor and Description |
|---|
CMapContentParser(PdfTokenizer tokeniser)
Creates a new instance of PdfContentParser
|
| Modifier and Type | Method and Description |
|---|---|
static String |
decodeCMapObject(CMapObject cMapObject) |
protected static String |
decodeName(byte[] content) |
boolean |
nextValidToken()
Reads the next token skipping over the comments.
|
void |
parse(List<CMapObject> ls)
Parses a single command from the content.
|
CMapObject |
readArray()
Reads an array.
|
CMapObject |
readDictionary()
Reads a dictionary.
|
CMapObject |
readObject()
Reads a pdf object.
|
static String |
toHex(int n)
Gets an hex string in the format "<HHHH>".
|
public static final int COMMAND_TYPE
public CMapContentParser(PdfTokenizer tokeniser)
tokeniser - the tokeniser with the contentpublic void parse(List<CMapObject> ls) throws IOException
ls - an ArrayList to use. It will be cleared before using.IOException - on errorpublic CMapObject readDictionary() throws IOException
"<<" token.IOException - on errorpublic CMapObject readArray() throws IOException
IOException - on errorpublic CMapObject readObject() throws IOException
IOException - on errorpublic boolean nextValidToken()
throws IOException
true if a token was read, false if the end of content was reached.IOException - on error.protected static String decodeName(byte[] content)
public static String toHex(int n)
n - the numberpublic static String decodeCMapObject(CMapObject cMapObject)
Copyright © 1998–2018 iText Group NV. All rights reserved.