## com.lowagie.text.pdf.fonts.cmaps
Class CMapParser

    java.lang.Object
      com.lowagie.text.pdf.fonts.cmaps.CMapParser

    public class CMapParser

extends java.lang.Object

This will parser a CMap stream.

Since:
  2.1.4
Version:
  $Revision$
Author:
  Ben Litchfield

Nested Class Summary
`private class` `CMapParser.LiteralName` Internal class.
`private class` `CMapParser.Operator` Internal class.

Field Summary
`private static java.lang.String` `BEGIN_BASE_FONT_CHAR`
`private static java.lang.String` `BEGIN_BASE_FONT_RANGE`
`private static java.lang.String` `BEGIN_CODESPACE_RANGE`
`private static java.lang.String` `MARK_END_OF_ARRAY`
`private static java.lang.String` `MARK_END_OF_DICTIONARY`
`private byte[]` `tokenParserByteBuffer`

Constructor Summary
`CMapParser()` Creates a new instance of CMapParser.

Method Summary
`private int` `compare(byte[] first, byte[] second)`
`private java.lang.String` `createStringFromBytes(byte[] bytes)`
`private void` `increment(byte[] data)`
`private void` `increment(byte[] data, int position)`
`private boolean` `isWhitespaceOrEOF(int aByte)`
`static void` `main(java.lang.String[] args)` A simple class to test parsing of cmap files.
`CMap` `parse(java.io.InputStream input)` This will parse the stream and create a cmap object.
`private java.lang.Object` `parseNextToken(java.io.PushbackInputStream is)`
`private void` `readUntilEndOfLine(java.io.InputStream is, java.lang.StringBuffer buf)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### BEGIN_CODESPACE_RANGE

    private static final java.lang.String BEGIN_CODESPACE_RANGE

See Also:
  Constant Field Values

### BEGIN_BASE_FONT_CHAR

    private static final java.lang.String BEGIN_BASE_FONT_CHAR

See Also:
  Constant Field Values

### BEGIN_BASE_FONT_RANGE

    private static final java.lang.String BEGIN_BASE_FONT_RANGE

See Also:
  Constant Field Values

### MARK_END_OF_DICTIONARY

    private static final java.lang.String MARK_END_OF_DICTIONARY

See Also:
  Constant Field Values

### MARK_END_OF_ARRAY

    private static final java.lang.String MARK_END_OF_ARRAY

See Also:
  Constant Field Values

### tokenParserByteBuffer

    private byte[] tokenParserByteBuffer

Constructor Detail

### CMapParser

    public CMapParser()

  Creates a new instance of CMapParser.

Method Detail

### parse

    public CMap parse(java.io.InputStream input)
               throws java.io.IOException

  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:
    `java.io.IOException` - If there is an error parsing the stream.

### parseNextToken

    private java.lang.Object parseNextToken(java.io.PushbackInputStream is)
                                     throws java.io.IOException

  Throws:
    `java.io.IOException`

### readUntilEndOfLine

    private void readUntilEndOfLine(java.io.InputStream is,
                                    java.lang.StringBuffer buf)
                             throws java.io.IOException

  Throws:
    `java.io.IOException`

### isWhitespaceOrEOF

    private boolean isWhitespaceOrEOF(int aByte)

### increment

    private void increment(byte[] data)

### increment

    private void increment(byte[] data,
                           int position)

### createStringFromBytes

    private java.lang.String createStringFromBytes(byte[] bytes)
                                            throws java.io.IOException

  Throws:
    `java.io.IOException`

### compare

    private int compare(byte[] first,
                        byte[] second)

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  A simple class to test parsing of cmap files.

  Parameters:
    `args` - Some command line arguments.
  Throws:
    `java.lang.Exception` - If there is an error parsing the file.

Hosted by Hostbasket