Class CMapParser


  • public class CMapParser
    extends java.lang.Object
    This will parse a CMap stream.
    Author:
    Ben Litchfield
    • Constructor Summary

      Constructors 
      Constructor Description
      CMapParser()
      Creates a new instance of CMapParser.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void main​(java.lang.String[] args)
      A simple class to test parsing of cmap files.
      CMap parse​(java.io.File file)
      Parse a CMAP file on the file system.
      CMap parse​(java.lang.String resourceRoot, java.io.InputStream input)
      This will parse the stream and create a cmap object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CMapParser

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

      • parse

        public CMap parse​(java.io.File file)
                   throws java.io.IOException
        Parse a CMAP file on the file system.
        Parameters:
        file - The file to parse.
        Returns:
        A parsed CMAP file.
        Throws:
        java.io.IOException - If there is an issue while parsing the CMAP.
      • parse

        public CMap parse​(java.lang.String resourceRoot,
                          java.io.InputStream input)
                   throws java.io.IOException
        This will parse the stream and create a cmap object.
        Parameters:
        resourceRoot - The root path to the cmap file. This will be used to find referenced cmap files. It can be null.
        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.
      • 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.