Package org.daisy.braille.utils.pef
Class PEFHandler
- java.lang.Object
-
- org.xml.sax.helpers.DefaultHandler
-
- org.daisy.braille.utils.pef.PEFHandler
-
- All Implemented Interfaces:
ContentHandler
,DTDHandler
,EntityResolver
,ErrorHandler
public class PEFHandler extends DefaultHandler
Provides a handler for reading a PEF-file and sending the contents to an Embosser. Constructor is private on purpose, use a Builder to create a new PEFHandler.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PEFHandler.Alignment
Defines alignment values.static class
PEFHandler.Builder
Provides a Builder for PEFHandler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
endDocument()
void
endElement(String uri, String localName, String qName)
boolean
hasWidthError()
Returns true if there is a width error, false otherwise.void
startElement(String uri, String localName, String qName, Attributes attributes)
-
Methods inherited from class org.xml.sax.helpers.DefaultHandler
endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning
-
-
-
-
Method Detail
-
startElement
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDefaultHandler
- Throws:
SAXException
-
hasWidthError
public boolean hasWidthError()
Returns true if there is a width error, false otherwise.- Returns:
- returns true if there is a width error, false otherwise
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Overrides:
endElement
in classDefaultHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Overrides:
characters
in classDefaultHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocument
in interfaceContentHandler
- Overrides:
endDocument
in classDefaultHandler
- Throws:
SAXException
-
-