public class PatternParser extends DefaultHandler
Constructor and Description |
---|
PatternParser() |
PatternParser(PatternConsumer consumer) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String local,
String raw) |
protected String |
getExceptionWord(ArrayList<?> ex) |
protected static String |
getInterletterValues(String pat) |
protected static String |
getPattern(String word) |
protected ArrayList<Object> |
normalizeException(ArrayList<?> ex) |
void |
parse(InputSource source)
Parses a hyphenation pattern file.
|
void |
parse(String filename)
Parses a hyphenation pattern file.
|
protected String |
readToken(StringBuilder chars) |
InputSource |
resolveEntity(String publicId,
String systemId) |
void |
setConsumer(PatternConsumer consumer) |
void |
startElement(String uri,
String local,
String raw,
Attributes attrs) |
endDocument, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
public PatternParser()
public PatternParser(PatternConsumer consumer)
public void setConsumer(PatternConsumer consumer)
public void parse(String filename) throws IOException
filename
- the filenameIOException
- In case of an exception while parsingpublic void parse(InputSource source) throws IOException
source
- the InputSource for the fileIOException
- In case of an exception while parsingprotected String readToken(StringBuilder chars)
public InputSource resolveEntity(String publicId, String systemId)
resolveEntity
in interface EntityResolver
resolveEntity
in class DefaultHandler
public void startElement(String uri, String local, String raw, Attributes attrs)
startElement
in interface ContentHandler
startElement
in class DefaultHandler
ContentHandler.startElement(java.lang.String,
java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String uri, String local, String raw)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
ContentHandler.endElement(java.lang.String,
java.lang.String, java.lang.String)
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
ContentHandler.characters(char[], int, int)
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.