java.lang.Object
org.jvnet.staxex.util.XMLStreamReaderToXMLStreamWriter
Reads a sub-tree from
XMLStreamReader
and writes to XMLStreamWriter
as-is.
This class can be sub-classed to implement a simple transformation logic.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate char[]
private static final int
protected XMLStreamReader
(package private) jakarta.xml.bind.attachment.AttachmentMarshaller
(package private) boolean
protected XMLStreamWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
bridge
(XMLStreamReader in, XMLStreamWriter out) Reads one subtree and writes it out.private void
bridge
(XMLStreamReader in, XMLStreamWriter out, XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) void
bridge
(XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) private static String
private int
private int
protected void
handleAttribute
(int i) Writes out thei
-th attribute of the current element.protected void
protected void
protected void
protected void
protected void
protected void
protected void
handlePI()
protected void
protected void
-
Field Details
-
BUF_SIZE
private static final int BUF_SIZE- See Also:
-
in
-
out
-
buf
private char[] buf -
optimizeBase64Data
boolean optimizeBase64Data -
mtomAttachmentMarshaller
jakarta.xml.bind.attachment.AttachmentMarshaller mtomAttachmentMarshaller
-
-
Constructor Details
-
XMLStreamReaderToXMLStreamWriter
public XMLStreamReaderToXMLStreamWriter()
-
-
Method Details
-
bridge
Reads one subtree and writes it out.The
XMLStreamWriter
never receives a start/end document event. Those need to be written separately by the caller.- Throws:
XMLStreamException
-
bridge
public void bridge(XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) throws XMLStreamException - Throws:
XMLStreamException
-
bridge
private void bridge(XMLStreamReader in, XMLStreamWriter out, XMLStreamReaderToXMLStreamWriter.Breakpoint breakPoint) throws XMLStreamException - Throws:
XMLStreamException
-
handlePI
- Throws:
XMLStreamException
-
handleCharacters
- Throws:
XMLStreamException
-
handleEndElement
- Throws:
XMLStreamException
-
handleStartElement
- Throws:
XMLStreamException
-
handleAttribute
Writes out thei
-th attribute of the current element.Used from
handleStartElement()
.- Throws:
XMLStreamException
-
handleDTD
- Throws:
XMLStreamException
-
handleComment
- Throws:
XMLStreamException
-
handleEntityReference
- Throws:
XMLStreamException
-
handleSpace
- Throws:
XMLStreamException
-
handleCDATA
- Throws:
XMLStreamException
-
fixNull
-
getEventType
- Throws:
XMLStreamException
-
getNextEvent
- Throws:
XMLStreamException
-