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
public class ElementWriter
- extends AbstractMessageWriter
- implements MessageWriter
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ElementWriter
public ElementWriter(javax.xml.stream.XMLStreamWriter writer)
- Create an ElementWriter but without writing an element name.
- Parameters:
writer
-
ElementWriter
public ElementWriter(javax.xml.stream.XMLStreamWriter writer,
String name,
String namespace)
ElementWriter
public ElementWriter(javax.xml.stream.XMLStreamWriter streamWriter,
QName name)
ElementWriter
public ElementWriter(javax.xml.stream.XMLStreamWriter writer,
String name,
String namespace,
String prefix)
ElementWriter
public ElementWriter(OutputStream os,
String name,
String namespace)
throws javax.xml.stream.XMLStreamException
- Parameters:
os
-
- Throws:
javax.xml.stream.XMLStreamException
writeValue
public void writeValue(Object value)
- Specified by:
writeValue
in interface MessageWriter
- See Also:
MessageWriter.writeValue(java.lang.Object)
getElementWriter
public MessageWriter getElementWriter(String nm)
- Specified by:
getElementWriter
in interface MessageWriter
- See Also:
org.apache.cxf.aegis.xml.MessageWriter#getWriter(java.lang.String)
getElementWriter
public MessageWriter getElementWriter(String nm,
String ns)
- Specified by:
getElementWriter
in interface MessageWriter
getElementWriter
public MessageWriter getElementWriter(QName qname)
- Specified by:
getElementWriter
in interface MessageWriter
getNamespace
public String getNamespace()
close
public void close()
- Description copied from interface:
MessageWriter
- Tells the MessageWriter that writing operations are completed so it can
write the end element.
- Specified by:
close
in interface MessageWriter
flush
public void flush()
throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
getXMLStreamWriter
public javax.xml.stream.XMLStreamWriter getXMLStreamWriter()
getAttributeWriter
public MessageWriter getAttributeWriter(String nm)
- Specified by:
getAttributeWriter
in interface MessageWriter
getAttributeWriter
public MessageWriter getAttributeWriter(String nm,
String ns)
- Specified by:
getAttributeWriter
in interface MessageWriter
getAttributeWriter
public MessageWriter getAttributeWriter(QName qname)
- Specified by:
getAttributeWriter
in interface MessageWriter
getPrefixForNamespace
public String getPrefixForNamespace(String ns)
- Specified by:
getPrefixForNamespace
in interface MessageWriter
getPrefixForNamespace
public String getPrefixForNamespace(String ns,
String hint)
- Description copied from interface:
MessageWriter
- Get 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.
- Specified by:
getPrefixForNamespace
in interface MessageWriter
- Parameters:
ns
- the namespace to retrieve the prefix forhint
- the hint for the prefix.
- Returns:
- the prefix associated with the namespace
Apache CXF