Package org.apache.cxf.aegis.xml.stax
Class ElementWriter
java.lang.Object
org.apache.cxf.aegis.xml.AbstractMessageWriter
org.apache.cxf.aegis.xml.stax.ElementWriter
- All Implemented Interfaces:
MessageWriter
-
Constructor Summary
ConstructorsConstructorDescriptionElementWriter(OutputStream os, String name, String namespace) ElementWriter(XMLStreamWriter writer) Create an ElementWriter but without writing an element name.ElementWriter(XMLStreamWriter writer, String name, String namespace) ElementWriter(XMLStreamWriter writer, String name, String namespace, String prefix) ElementWriter(XMLStreamWriter streamWriter, QName name) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Tells the MessageWriter that writing operations are completed so it can write the end element.voidflush()getAttributeWriter(String nm, String ns) getAttributeWriter(QName qname) getElementWriter(String nm, String ns) getElementWriter(QName qname) getPrefixForNamespace(String ns, String hint) Get a prefix for a namespace.voidwriteValue(Object value) Methods inherited from class org.apache.cxf.aegis.xml.AbstractMessageWriter
writeValueAsBoolean, writeValueAsByte, writeValueAsCharacter, writeValueAsDouble, writeValueAsFloat, writeValueAsInt, writeValueAsLong, writeValueAsShort, writeXsiNil, writeXsiType
-
Constructor Details
-
ElementWriter
Create an ElementWriter but without writing an element name.- Parameters:
writer-
-
ElementWriter
-
ElementWriter
-
ElementWriter
-
ElementWriter
- Parameters:
os-- Throws:
XMLStreamException
-
-
Method Details
-
writeValue
-
getElementWriter
- See Also:
-
org.apache.cxf.aegis.xml.MessageWriter#getWriter(java.lang.String)
-
getElementWriter
-
getElementWriter
-
getNamespace
-
close
public void close()Description copied from interface:MessageWriterTells the MessageWriter that writing operations are completed so it can write the end element. -
flush
- Throws:
XMLStreamException
-
getXMLStreamWriter
-
getAttributeWriter
-
getAttributeWriter
-
getAttributeWriter
-
getPrefixForNamespace
-
getPrefixForNamespace
Description copied from interface:MessageWriterGet a prefix for a namespace. After calling this, the prefix returned is registered with the namespace. This method will make an attempt to use the hint prefix if possible. If the namespace is already registered or the hint is already registered with a different namespace then the behavior will be the same as the non-hint version.- Parameters:
ns- the namespace to retrieve the prefix forhint- the hint for the prefix.- Returns:
- the prefix associated with the namespace
-