下面列出了org.xml.sax.DTDHandler#com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
*
* @throws SAXException
* if a parsing fails, or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
if (p instanceof ErrorHandler) {
p.setErrorHandler((ErrorHandler)handler);
}
p.process();
}
/**
* Write the contents of the buffer to a {@link ContentHandler} with errors
* report to a {@link ErrorHandler}.
*
* <p>
* If the <code>handler</code> is also an instance of other SAX-based
* handlers, such as {@link LexicalHandler}, than corresponding SAX events
* will be reported to those handlers.
*
* @param handler
* The ContentHandler to receive SAX events.
* @param errorHandler
* The ErrorHandler to receive error events.
*
* @throws SAXException
* if a parsing fails and {@link ErrorHandler} throws a {@link SAXException},
* or if {@link ContentHandler} throws a {@link SAXException}.
*/
public final void writeTo(ContentHandler handler, ErrorHandler errorHandler, boolean produceFragmentEvent) throws SAXException {
SAXBufferProcessor p = readAsXMLReader(produceFragmentEvent);
p.setContentHandler(handler);
if (p instanceof LexicalHandler) {
p.setLexicalHandler((LexicalHandler)handler);
}
if (p instanceof DTDHandler) {
p.setDTDHandler((DTDHandler)handler);
}
p.setErrorHandler(errorHandler);
p.process();
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @return
* A an instance of a {@link SAXBufferProcessor}.
* @deprecated
* Use {@link #readAsXMLReader(boolean)}
*/
public final SAXBufferProcessor readAsXMLReader() {
return new SAXBufferProcessor(this,isFragment());
}
/**
* Reads the contents of the buffer from a {@link XMLReader}.
*
* @param produceFragmentEvent
* True to generate fragment SAX events without start/endDocument.
* False to generate a full document SAX events.
* @return
* A an instance of a {@link SAXBufferProcessor}.
*/
public final SAXBufferProcessor readAsXMLReader(boolean produceFragmentEvent) {
return new SAXBufferProcessor(this,produceFragmentEvent);
}