Package com.tom_roush.fontbox.cmap
Class CMapParser
- java.lang.Object
-
- com.tom_roush.fontbox.cmap.CMapParser
-
public class CMapParser extends Object
Parses a CMap stream.
-
-
Constructor Summary
Constructors Constructor Description CMapParser()Creates a new instance of CMapParser.CMapParser(boolean strictMode)Creates a new instance of CMapParser.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected InputStreamgetExternalCMap(String name)Returns an input stream containing the given "use" CMap.CMapparse(File file)Parse a CMAP file on the file system.CMapparse(InputStream input)This will parse the stream and create a cmap object.CMapparsePredefined(String name)Parses a predefined CMap.
-
-
-
Method Detail
-
parse
public CMap parse(File file) throws IOException
Parse a CMAP file on the file system.- Parameters:
file- The file to parse.- Returns:
- A parsed CMAP file.
- Throws:
IOException- If there is an issue while parsing the CMAP.
-
parsePredefined
public CMap parsePredefined(String name) throws IOException
Parses a predefined CMap.- Parameters:
name- CMap name.- Returns:
- The parsed predefined CMap as a java object, never null.
- Throws:
IOException- If the CMap could not be parsed.
-
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, never null.
- Throws:
IOException- If there is an error parsing the stream.
-
getExternalCMap
protected InputStream getExternalCMap(String name) throws IOException
Returns an input stream containing the given "use" CMap.- Parameters:
name- Name of the given "use" CMap resource.- Throws:
IOException- if the CMap resource doesn't exist or if there is an error opening its stream.
-
-