Package org.xmlresolver.utils
Interface SaxProducer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Similar to
Consumer
but
permits an IOException or a SAXException to be thrown.
Influenced by TriConsumer2E<ContentHandler, IOException, SAXException>-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
Simple adapter for XMLResolver SaxProducer to Jing SaxProducer. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.thaiopensource.validate.ValidationDriver.SaxProducer
adaptForJing
(SaxProducer saxProducer) Adapt the provided XMLResolver SaxProducer to a Jing SaxProducer.void
produce
(ContentHandler contentHandler, DTDHandler dtdHandler, ErrorHandler errorHandler) Causes the producer to process and send SAX events.
-
Method Details
-
produce
void produce(ContentHandler contentHandler, DTDHandler dtdHandler, ErrorHandler errorHandler) throws IOException, SAXException Causes the producer to process and send SAX events.- Parameters:
contentHandler
- the Content HandlerdtdHandler
- the DTD handler, or null if absent.errorHandler
- the error handler, or null if absent.- Throws:
IOException
- if an error occurs during processingSAXException
- if a SAXException occurs when calling one of the handlers
-
adaptForJing
static com.thaiopensource.validate.ValidationDriver.SaxProducer adaptForJing(SaxProducer saxProducer) Adapt the provided XMLResolver SaxProducer to a Jing SaxProducer.- Parameters:
saxProducer
- the XMLResolver SaxProducer.- Returns:
- the Jing SaxProducer.
-