Package com.sun.xml.ws.streaming
Class XMLStreamWriterUtil
java.lang.Object
com.sun.xml.ws.streaming.XMLStreamWriterUtil
XMLStreamWriterUtil provides some utility methods intended to be used in conjunction with a StAX XMLStreamWriter.
- Author:
- Santiago.PericasGeertsen@sun.com
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringencodeQName(XMLStreamWriter writer, QName qname, PrefixFactory prefixFactory) static StringgetEncoding(XMLStreamWriter writer) Gives the encoding with which XMLStreamWriter is created.static OutputStreamgetOutputStream(XMLStreamWriter writer) Gives the underlying stream for XMLStreamWriter.
-
Method Details
-
getOutputStream
@Nullable public static OutputStream getOutputStream(XMLStreamWriter writer) throws XMLStreamException Gives the underlying stream for XMLStreamWriter. It closes any start elements, and returns the stream so that JAXB can write infoset directly to the stream.- Parameters:
writer- XMLStreamWriter for which stream is required- Returns:
- underlying OutputStream, null if writer doesn't provide a way to get it
- Throws:
XMLStreamException- if any of writer operations throw the exception
-
getEncoding
Gives the encoding with which XMLStreamWriter is created.- Parameters:
writer- XMLStreamWriter for which encoding is required- Returns:
- null if cannot be found, else the encoding
-
encodeQName
-