public class PatternParser extends DefaultHandler
This work was authored by Carlos Villegas (cav@uniscope.co.jp).
| Constructor and Description |
|---|
PatternParser(IPatternConsumer consumer)
Construct a pattern parser.
|
| Modifier and Type | Method and Description |
|---|---|
void |
characters(char[] ch,
int start,
int length) |
void |
endElement(String uri,
String local,
String raw) |
void |
error(SAXParseException ex) |
void |
fatalError(SAXParseException ex) |
protected void |
getExternalClasses() |
void |
parse(InputStream stream,
String name)
Parses a hyphenation pattern file.
|
void |
parse(String filename)
Parses a hyphenation pattern file.
|
void |
startElement(String uri,
String local,
String raw,
Attributes attrs) |
void |
warning(SAXParseException ex) |
endDocument, endPrefixMapping, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDeclpublic PatternParser(IPatternConsumer consumer) throws HyphenationException
consumer - a pattern consumerHyphenationException - if a hyphenation exception is raisedpublic void parse(String filename) throws HyphenationException, FileNotFoundException
filename - the filenameHyphenationException - In case of an exception while parsingFileNotFoundException - If the specified file is not foundpublic void parse(InputStream stream, String name) throws HyphenationException
stream - the InputStream for the filename - unique key representing country-language combinationHyphenationException - In case of an exception while parsingprotected void getExternalClasses()
throws SAXException
SAXException - if not caughtpublic void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException
startElement in interface ContentHandlerstartElement in class DefaultHandlerSAXException - if parsing of hyphenation classes resource xml has failed.public void endElement(String uri, String local, String raw)
endElement in interface ContentHandlerendElement in class DefaultHandlerpublic void characters(char[] ch,
int start,
int length)
characters in interface ContentHandlercharacters in class DefaultHandlerpublic void warning(SAXParseException ex)
warning in interface ErrorHandlerwarning in class DefaultHandlerpublic void error(SAXParseException ex)
error in interface ErrorHandlererror in class DefaultHandlerpublic void fatalError(SAXParseException ex) throws SAXException
fatalError in interface ErrorHandlerfatalError in class DefaultHandlerSAXExceptionCopyright © 1998–2020 iText Group NV. All rights reserved.