UTF8StreamWriter (JiBX Java data binding to XML - Version 1.2.6)
Date: 2014-12-30

org.jibx.runtime.impl

## Class UTF8StreamWriter

- java.lang.Object
- - org.jibx.runtime.impl.XMLWriterNamespaceBase
  - - org.jibx.runtime.impl.XMLWriterBase
    - - org.jibx.runtime.impl.StreamWriterBase
      - - org.jibx.runtime.impl.UTF8StreamWriter

- All Implemented Interfaces:
    IExtensibleWriter, IXMLWriter

      public class UTF8StreamWriter
      extends StreamWriterBase

  Handler for marshalling text document to a UTF-8 output stream.
  Author:
    Dennis M. Sosnoski

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UTF8StreamWriter(java.lang.String[] uris)` Constructor with supplied buffer.
    `UTF8StreamWriter(UTF8StreamWriter base, java.lang.String[] uris)` Copy constructor.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `IXMLWriter` | `createChildWriter(java.lang.String[] uris)` Create a child writer instance to be used for a separate binding.
    `void` | `writeCData(java.lang.String text)` Write CDATA text to document.
    `void` | `writeTextContent(java.lang.String text)` Write ordinary character data text content to document.

    - ### Methods inherited from class org.jibx.runtime.impl.StreamWriterBase

      `close, flush, getEncodingName, indent, indent, popExtensionNamespaces, pushExtensionNamespaces, setBuffer, setIndentSpaces, setNamespaceUris`

    - ### Methods inherited from class org.jibx.runtime.impl.XMLWriterBase

      `addAttribute, closeEmptyTag, closeStartTag, endTag, init, reset, startTagClosed, startTagNamespaces, startTagOpen, writeComment, writeDocType, writeEntityRef, writePI, writeXMLDecl`

    - ### Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase

      `getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, openNamespaces, popTranslationTable, pushTranslationTable, translateNamespace`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.jibx.runtime.IXMLWriter

      `getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, openNamespaces, popTranslationTable, pushTranslationTable`

- - ### Constructor Detail

    - #### UTF8StreamWriter

          public UTF8StreamWriter(java.lang.String[] uris)

      Constructor with supplied buffer.
      Parameters:
        `uris` - ordered array of URIs for namespaces used in document (must be constant; the value in position 0 must always be the empty string "", and the value in position 1 must always be the XML namespace "http://www.w3.org/XML/1998/namespace")

    - #### UTF8StreamWriter

          public UTF8StreamWriter(UTF8StreamWriter base,
                          java.lang.String[] uris)

      Copy constructor. This takes the stream from a supplied instance, while setting a new array of namespace URIs. It's intended for use when invoking one binding from within another binding.
      Parameters:
        `base` - instance to be used as base for writer
        `uris` - ordered array of URIs for namespaces used in document (see `UTF8StreamWriter(String[])`)

  - ### Method Detail

    - #### writeTextContent

          public void writeTextContent(java.lang.String text)
                                throws java.io.IOException

      Write ordinary character data text content to document.
      Parameters:
        `text` - content value text
      Throws:
        `java.io.IOException` - on error writing to document

    - #### writeCData

          public void writeCData(java.lang.String text)
                          throws java.io.IOException

      Write CDATA text to document.
      Parameters:
        `text` - content value text
      Throws:
        `java.io.IOException` - on error writing to document

    - #### createChildWriter

          public IXMLWriter createChildWriter(java.lang.String[] uris)
                                       throws java.io.IOException

      Create a child writer instance to be used for a separate binding. The child writer inherits the stream and encoding from this writer, while using the supplied namespace URIs.
      Parameters:
        `uris` - ordered array of URIs for namespaces used in document (see `UTF8StreamWriter(String[])`)
      Returns:
        child writer
      Throws:
        `java.io.IOException`

Project Web Site |