@Beta public final class UntrustedXML extends Object
Modifier and Type | Method and Description |
---|---|
static @NonNull XMLStreamReader |
createXMLStreamReader(InputStream stream)
Create a new
XMLStreamReader for dealing with untrusted XML data. |
static @NonNull XMLStreamReader |
createXMLStreamReader(InputStream stream,
Charset charset)
Create a new
XMLStreamReader for dealing with untrusted XML data. |
static @NonNull XMLStreamReader |
createXMLStreamReader(Reader reader)
Create a new
XMLStreamReader for dealing with untrusted XML data. |
static @NonNull DocumentBuilder |
newDocumentBuilder()
Create a new
DocumentBuilder for dealing with untrusted XML data. |
static @NonNull SAXParser |
newSAXParser()
Create a new
SAXParser for dealing with untrusted XML data. |
public static @NonNull DocumentBuilder newDocumentBuilder()
DocumentBuilder
for dealing with untrusted XML data. This method is equivalent to
DocumentBuilderFactory.newDocumentBuilder()
, except it does not throw a checked exception.UnsupportedOperationException
- if the runtime fails to instantiate a good enough builderpublic static @NonNull SAXParser newSAXParser()
SAXParser
for dealing with untrusted XML data. This method is equivalent to
SAXParserFactory.newSAXParser()
, except it does not throw a checked exception.UnsupportedOperationException
- if the runtime fails to instantiate a good enough builderpublic static @NonNull XMLStreamReader createXMLStreamReader(InputStream stream) throws XMLStreamException
XMLStreamReader
for dealing with untrusted XML data. This method is equivalent to
XMLInputFactory.createXMLStreamReader(InputStream)
.XMLStreamException
- when the underlying factory throws itpublic static @NonNull XMLStreamReader createXMLStreamReader(InputStream stream, Charset charset) throws XMLStreamException
XMLStreamReader
for dealing with untrusted XML data. This method is equivalent to
XMLInputFactory.createXMLStreamReader(InputStream, String)
, except it takes an explict charset argument.XMLStreamException
- when the underlying factory throws itpublic static @NonNull XMLStreamReader createXMLStreamReader(Reader reader) throws XMLStreamException
XMLStreamReader
for dealing with untrusted XML data. This method is equivalent to
XMLInputFactory.createXMLStreamReader(Reader)
.XMLStreamException
- when the underlying factory throws itCopyright © 2019 OpenDaylight. All rights reserved.