/** * Create a SAXResult that targets a SAX2 {@link org.xml.sax.ContentHandler}. * * @param handler Must be a non-null ContentHandler reference. */ public SAXResult(ContentHandler handler) { setHandler(handler); }
/** * Construct a new instance of the {@code StaxResult} with the specified {@code XMLStreamWriter}. * @param streamWriter the {@code XMLStreamWriter} to write to */ public StaxResult(XMLStreamWriter streamWriter) { StaxStreamHandler handler = new StaxStreamHandler(streamWriter); super.setHandler(handler); super.setLexicalHandler(handler); this.streamWriter = streamWriter; }
/** * Construct a new instance of the {@code StaxResult} with the specified {@code XMLEventWriter}. * @param eventWriter the {@code XMLEventWriter} to write to */ public StaxResult(XMLEventWriter eventWriter) { StaxEventHandler handler = new StaxEventHandler(eventWriter); super.setHandler(handler); super.setLexicalHandler(handler); this.eventWriter = eventWriter; }
/** * Construct a new instance of the {@code StaxResult} with the specified {@code XMLStreamWriter}. * @param streamWriter the {@code XMLStreamWriter} to write to */ public StaxResult(XMLStreamWriter streamWriter) { StaxStreamHandler handler = new StaxStreamHandler(streamWriter); super.setHandler(handler); super.setLexicalHandler(handler); this.streamWriter = streamWriter; }
/** * Construct a new instance of the {@code StaxResult} with the specified {@code XMLEventWriter}. * @param eventWriter the {@code XMLEventWriter} to write to */ public StaxResult(XMLEventWriter eventWriter) { StaxEventHandler handler = new StaxEventHandler(eventWriter); super.setHandler(handler); super.setLexicalHandler(handler); this.eventWriter = eventWriter; }
/** * Creates a new instance that uses the specified * Unmarshaller to unmarshal an object. * * <p> * This JAXBResult object will use the specified Unmarshaller * instance. It is the caller's responsibility not to use the * same Unmarshaller for other purposes while it is being * used by this object. * * <p> * The primary purpose of this method is to allow the client * to configure Unmarshaller. Unless you know what you are doing, * it's easier and safer to pass a JAXBContext. * * @param _unmarshaller the unmarshaller. This parameter must not be null. * @throws JAXBException if an error is encountered while creating the * JAXBResult or the Unmarshaller parameter is null. */ public JAXBResult( Unmarshaller _unmarshaller ) throws JAXBException { if( _unmarshaller == null ) throw new JAXBException( Messages.format( Messages.RESULT_NULL_UNMARSHALLER ) ); this.unmarshallerHandler = _unmarshaller.getUnmarshallerHandler(); super.setHandler(unmarshallerHandler); }
public void setHandler(ContentHandler handler) { if (handler instanceof DOMSAXContentHandler) { this.contentHandler = (DOMSAXContentHandler) handler; super.setHandler(this.contentHandler); } }
public void setHandler(ContentHandler handler) { if (handler instanceof SAXContentHandler) { this.contentHandler = (SAXContentHandler) handler; super.setHandler(this.contentHandler); } }
/** * Constructs a new instance of the <code>StaxResult</code> with the specified <code>XMLEventWriter</code>. * * @param eventWriter the <code>XMLEventWriter</code> to write to */ StaxResult(XMLEventWriter eventWriter) { super.setHandler(new StaxEventContentHandler(eventWriter)); this.eventWriter = eventWriter; }
/** * Constructs a new instance of the <code>StaxResult</code> with the specified <code>XMLEventWriter</code> and * <code>XMLEventFactory</code>. * * @param eventWriter the <code>XMLEventWriter</code> to write to * @param eventFactory the <code>XMLEventFactory</code> to use for creating events */ StaxResult(XMLEventWriter eventWriter, XMLEventFactory eventFactory) { super.setHandler(new StaxEventContentHandler(eventWriter, eventFactory)); this.eventWriter = eventWriter; }
/** * Constructs a new instance of the <code>StaxResult</code> with the specified <code>XMLStreamWriter</code>. * * @param streamWriter the <code>XMLStreamWriter</code> to write to */ StaxResult(XMLStreamWriter streamWriter) { super.setHandler(new StaxStreamContentHandler(streamWriter)); this.streamWriter = streamWriter; }
public DocumentResult(SAXContentHandler contentHandler) { this.contentHandler = contentHandler; super.setHandler(this.contentHandler); super.setLexicalHandler(this.contentHandler); }
public DOMDocumentResult(DOMSAXContentHandler contentHandler) { this.contentHandler = contentHandler; super.setHandler(this.contentHandler); super.setLexicalHandler(this.contentHandler); }
/** * Public default constructor. */ public JDOMResult() { // Allocate custom builder object... DocumentBuilder builder = new DocumentBuilder(); // And use it as ContentHandler and LexicalHandler. super.setHandler(builder); super.setLexicalHandler(builder); }
public void setHandler(ContentHandler handler) { if (handler instanceof SAXContentHandler) { this.contentHandler = (SAXContentHandler) handler; super.setHandler(this.contentHandler); } }
/** * Create a SAXResult that targets a SAX2 {@link org.xml.sax.ContentHandler}. * * @param handler Must be a non-null ContentHandler reference. */ public SAXResult(ContentHandler handler) { setHandler(handler); }
public void setHandler(ContentHandler handler) { if (handler instanceof SAXContentHandler) { this.contentHandler = (SAXContentHandler) handler; super.setHandler(this.contentHandler); } }
public DOMDocumentResult(DOMSAXContentHandler contentHandler) { this.contentHandler = contentHandler; super.setHandler(this.contentHandler); super.setLexicalHandler(this.contentHandler); }
public DocumentResult(SAXContentHandler contentHandler) { this.contentHandler = contentHandler; super.setHandler(this.contentHandler); super.setLexicalHandler(this.contentHandler); }
public DocumentResult(SAXContentHandler contentHandler) { this.contentHandler = contentHandler; super.setHandler(this.contentHandler); super.setLexicalHandler(this.contentHandler); }