Interface MessageWriter

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

public interface MessageWriter
Writes messages to an output stream.
  • Method Details

    • 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:
      qn - the QName of the type being referenced.
    • writeXsiNil

      void writeXsiNil()