public class XMLStreamWriterUtil extends Object
XMLStreamWriterUtil provides some utility methods intended to be used in conjunction with a StAX XMLStreamWriter.
Modifier and Type | Method and Description |
---|---|
static String |
encodeQName(javax.xml.stream.XMLStreamWriter writer,
QName qname,
PrefixFactory prefixFactory) |
static String |
getEncoding(javax.xml.stream.XMLStreamWriter writer)
Gives the encoding with which XMLStreamWriter is created.
|
static OutputStream |
getOutputStream(javax.xml.stream.XMLStreamWriter writer)
Gives the underlying stream for XMLStreamWriter.
|
@Nullable public static OutputStream getOutputStream(javax.xml.stream.XMLStreamWriter writer) throws javax.xml.stream.XMLStreamException
writer
- XMLStreamWriter for which stream is requiredjavax.xml.stream.XMLStreamException
- if any of writer operations throw the exception@Nullable public static String getEncoding(javax.xml.stream.XMLStreamWriter writer)
writer
- XMLStreamWriter for which encoding is requiredpublic static String encodeQName(javax.xml.stream.XMLStreamWriter writer, QName qname, PrefixFactory prefixFactory)
Copyright (c) 1997-2012 Oracle and/or its affiliates. All rights reserved.