Class CMapParser

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

public class CMapParser extends Object
This will parser a CMap stream.
Since:
2.1.4
Version:
$Revision: 4065 $
  • Field Details

  • Constructor Details

    • CMapParser

      public CMapParser()
      Creates a new instance of CMapParser.
  • Method Details

    • main

      public static void main(String[] args) throws Exception
      A simple class to test parsing of cmap files.
      Parameters:
      args - Some command line arguments.
      Throws:
      Exception - If there is an error parsing the file.
    • parse

      public CMap parse(InputStream input) throws 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:
      IOException - If there is an error parsing the stream.
    • parseNextToken

      private Object parseNextToken(PushbackInputStream is) throws IOException
      Throws:
      IOException
    • readUntilEndOfLine

      private void readUntilEndOfLine(InputStream is, StringBuffer buf) throws IOException
      Throws:
      IOException
    • isWhitespaceOrEOF

      private boolean isWhitespaceOrEOF(int aByte)
    • increment

      private void increment(byte[] data)
    • increment

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

      private String createStringFromBytes(byte[] bytes) throws IOException
      Throws:
      IOException
    • compare

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