Java Code Examples for com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor#process()
The following examples show how to use
com.sun.xml.internal.stream.buffer.sax.SAXBufferProcessor#process() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: XMLStreamBuffer.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 2
Source File: XMLStreamBuffer.java From TencentKona-8 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 3
Source File: XMLStreamBuffer.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 4
Source File: XMLStreamBuffer.java From jdk8u60 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 5
Source File: XMLStreamBuffer.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 6
Source File: XMLStreamBuffer.java From openjdk-jdk8u with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 7
Source File: XMLStreamBuffer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 8
Source File: XMLStreamBuffer.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 9
Source File: XMLStreamBuffer.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 10
Source File: XMLStreamBuffer.java From openjdk-jdk9 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 11
Source File: XMLStreamBuffer.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 12
Source File: XMLStreamBuffer.java From hottub with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 13
Source File: XMLStreamBuffer.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 14
Source File: XMLStreamBuffer.java From openjdk-8-source with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 15
Source File: XMLStreamBuffer.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }
Example 16
Source File: XMLStreamBuffer.java From openjdk-8 with GNU General Public License v2.0 | 3 votes |
/** * 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(); }