Class CMapParser
java.lang.Object
org.openpdf.text.pdf.fonts.cmaps.CMapParser
This will parser a CMap stream.
- Since:
- 2.1.4
- Version:
- $Revision: 4065 $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classInternal class.private classInternal class. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intcompare(byte[] first, byte[] second) private StringcreateStringFromBytes(byte[] bytes) private voidincrement(byte[] data) private voidincrement(byte[] data, int position) private booleanisWhitespaceOrEOF(int aByte) static voidA simple class to test parsing of cmap files.parse(InputStream input) This will parse the stream and create a cmap object.private Objectprivate voidreadUntilEndOfLine(InputStream is, StringBuffer buf)
-
Field Details
-
BEGIN_CODESPACE_RANGE
- See Also:
-
BEGIN_BASE_FONT_CHAR
- See Also:
-
BEGIN_BASE_FONT_RANGE
- See Also:
-
MARK_END_OF_DICTIONARY
- See Also:
-
MARK_END_OF_ARRAY
- See Also:
-
tokenParserByteBuffer
private byte[] tokenParserByteBuffer
-
-
Constructor Details
-
CMapParser
public CMapParser()Creates a new instance of CMapParser.
-
-
Method Details
-
main
-
parse
This will parse the stream and create a cmap object.- Parameters:
input- The CMAP stream to parse.- Returns:
- The parsed stream as a java object.
- Throws:
IOException- If there is an error parsing the stream.
-
parseNextToken
- Throws:
IOException
-
readUntilEndOfLine
- Throws:
IOException
-
isWhitespaceOrEOF
private boolean isWhitespaceOrEOF(int aByte) -
increment
private void increment(byte[] data) -
increment
private void increment(byte[] data, int position) -
createStringFromBytes
- Throws:
IOException
-
compare
private int compare(byte[] first, byte[] second)
-