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, unparsedEntityDecl
public PatternParser(IPatternConsumer consumer) throws HyphenationException
consumer
- a pattern consumer
HyphenationException
- if a hyphenation exception is raised
public void parse(String filename) throws HyphenationException, FileNotFoundException
filename
- the filename
HyphenationException
- In case of an exception while parsing
FileNotFoundException
- If the specified file is not found
public void parse(InputStream stream, String name) throws HyphenationException
stream
- the InputStream for the file
name
- unique key representing country-language combination
HyphenationException
- In case of an exception while parsing
protected void getExternalClasses() throws SAXException
SAXException
- if not caught
public void startElement(String uri, String local, String raw, Attributes attrs) throws SAXException
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
- if parsing of hyphenation classes resource xml has failed.
public void endElement(String uri, String local, String raw)
endElement
in interface ContentHandler
endElement
in class DefaultHandler
public void characters(char[] ch, int start, int length)
characters
in interface ContentHandler
characters
in class DefaultHandler
public void warning(SAXParseException ex)
warning
in interface ErrorHandler
warning
in class DefaultHandler
public void error(SAXParseException ex)
error
in interface ErrorHandler
error
in class DefaultHandler
public void fatalError(SAXParseException ex) throws SAXException
fatalError
in interface ErrorHandler
fatalError
in class DefaultHandler
SAXException
Copyright © 1998–2023 iText Group NV. All rights reserved.