org.foray.ps.encode
Class CharSetParser

java.lang.Object
  extended by org.foray.ps.encode.CharSetParser

public class CharSetParser
extends Object

A GlyphListParser instance parses a glyph list, arranging its data for efficient use during processing.


Constructor Summary
CharSetParser(InputStream input)
          Create a new CharSetParser instance.
 
Method Summary
 char[] getCharacterSet()
          Returns the parsed Unicode code points in this character set.
static void main(String[] args)
          Main method useful for parsing a glyph list file from the command-line and generating the java code that encapsulates that glyph list.
 void parseList()
          Parses a glyph list.
 void writeAsJavaStatics(OutputStream out)
          Writes out the array that has been parsed into java source code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharSetParser

public CharSetParser(InputStream input)
Create a new CharSetParser instance.

Parameters:
input - The reader encapsulating the file to be read.
Method Detail

parseList

public void parseList()
               throws IOException,
                      org.axsl.ps.PsException
Parses a glyph list.

Throws:
IOException - For I/O error.
org.axsl.ps.PsException - For errors parsing the input.

writeAsJavaStatics

public void writeAsJavaStatics(OutputStream out)
                        throws IOException
Writes out the array that has been parsed into java source code. This is useful in cases where you wish to permanently encapsulate a character set.

Parameters:
out - The OutputStream to which the data structures should be written.
Throws:
IOException - For errors when writing to out.

getCharacterSet

public char[] getCharacterSet()
Returns the parsed Unicode code points in this character set.

Returns:
The Unicode code points in this character set.

main

public static void main(String[] args)
Main method useful for parsing a glyph list file from the command-line and generating the java code that encapsulates that glyph list.

Parameters:
args - Element 0 is the URL of the glyph list to be parsed. Element 1 is the URL of the file to which the java source code should be written.


Copyright © 2017. All rights reserved.