Apache CXF API

org.apache.cxf.aegis.xml
Interface MessageWriter

All Known Implementing Classes:
AbstractMessageWriter, AttributeWriter, AttributeWriter, ElementWriter

public interface MessageWriter

Writes messages to an output stream.


Method Summary
 void close()
          Tells the MessageWriter that writing operations are completed so it can write the end element.
 MessageWriter getAttributeWriter(QName qname)
           
 MessageWriter getAttributeWriter(String name)
           
 MessageWriter getAttributeWriter(String name, String namespace)
           
 MessageWriter getElementWriter(QName qname)
           
 MessageWriter getElementWriter(String name)
           
 MessageWriter getElementWriter(String name, String namespace)
           
 String getPrefixForNamespace(String namespace)
           
 String getPrefixForNamespace(String namespace, String hint)
          Get a prefix for a namespace.
 void writeValue(Object value)
           
 void writeValueAsBoolean(boolean b)
           
 void writeValueAsByte(Byte b)
           
 void writeValueAsCharacter(Character char1)
           
 void writeValueAsDouble(Double double1)
           
 void writeValueAsFloat(Float f)
           
 void writeValueAsInt(Integer i)
           
 void writeValueAsLong(Long l)
           
 void writeValueAsShort(Short short1)
           
 void writeXsiNil()
           
 void writeXsiType(QName qn)
          As per 2.6.1 in XML Schema Part 1: "An element information item in an instance may, however, explicitly assert its type using the attribute xsi:type."
 

Method Detail

writeValue

void writeValue(Object value)

writeValueAsInt

void writeValueAsInt(Integer i)

writeValueAsCharacter

void writeValueAsCharacter(Character char1)

writeValueAsDouble

void writeValueAsDouble(Double double1)

writeValueAsLong

void writeValueAsLong(Long l)

writeValueAsFloat

void writeValueAsFloat(Float f)

writeValueAsShort

void writeValueAsShort(Short short1)

writeValueAsByte

void writeValueAsByte(Byte b)

writeValueAsBoolean

void writeValueAsBoolean(boolean b)

getAttributeWriter

MessageWriter getAttributeWriter(String name)

getAttributeWriter

MessageWriter getAttributeWriter(String name,
                                 String namespace)

getAttributeWriter

MessageWriter getAttributeWriter(QName qname)

getElementWriter

MessageWriter getElementWriter(String name)

getElementWriter

MessageWriter getElementWriter(String name,
                               String namespace)

getElementWriter

MessageWriter getElementWriter(QName qname)

getPrefixForNamespace

String getPrefixForNamespace(String namespace)

getPrefixForNamespace

String getPrefixForNamespace(String namespace,
                             String hint)
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.

Parameters:
namespace - the namespace to retrieve the prefix for
hint - the hint for the prefix.
Returns:
the prefix associated with the namespace

close

void close()
Tells the MessageWriter that writing operations are completed so it can write the end element.


writeXsiType

void writeXsiType(QName qn)
As per 2.6.1 in XML Schema Part 1: "An element information item in an instance may, however, explicitly assert its type using the attribute xsi:type."

Parameters:
type - the QName of the type being referenced.

writeXsiNil

void writeXsiNil()

Apache CXF API

Apache CXF