Class ByteArrayXmlStreamReader
- java.lang.Object
-
- javax.xml.stream.util.StreamReaderDelegate
-
- io.micronaut.xml.jackson.server.convert.ByteArrayXmlStreamReader
-
- All Implemented Interfaces:
java.lang.AutoCloseable,javax.xml.stream.XMLStreamConstants,javax.xml.stream.XMLStreamReader
@Internal public final class ByteArrayXmlStreamReader extends javax.xml.stream.util.StreamReaderDelegate implements java.lang.AutoCloseableStream reader that pairs xml stream with underlying byte array.- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description ByteArrayXmlStreamReader(byte[] bytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteArrayXmlStreamReaderreset()The xmlStream is stateful.-
Methods inherited from class javax.xml.stream.util.StreamReaderDelegate
close, getAttributeCount, getAttributeLocalName, getAttributeName, getAttributeNamespace, getAttributePrefix, getAttributeType, getAttributeValue, getAttributeValue, getCharacterEncodingScheme, getElementText, getEncoding, getEventType, getLocalName, getLocation, getName, getNamespaceContext, getNamespaceCount, getNamespacePrefix, getNamespaceURI, getNamespaceURI, getNamespaceURI, getParent, getPIData, getPITarget, getPrefix, getProperty, getText, getTextCharacters, getTextCharacters, getTextLength, getTextStart, getVersion, hasName, hasNext, hasText, isAttributeSpecified, isCharacters, isEndElement, isStandalone, isStartElement, isWhiteSpace, next, nextTag, require, setParent, standaloneSet
-
-
-
-
Method Detail
-
reset
public ByteArrayXmlStreamReader reset()
The xmlStream is stateful. Once we walked through the whole stream, before we can re-read its content we need to reset state. Unfortunately the stream implementation does not have an api to flush the state, so a simple solution is to create a new instance with the same underlying byte array.- Returns:
- new instance with fresh state
-
-