| 
 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||
java.lang.Objectorg.jibx.runtime.impl.XMLWriterNamespaceBase
org.jibx.runtime.impl.XMLWriterBase
org.jibx.runtime.impl.StreamWriterBase
public abstract class StreamWriterBase
Base handler for marshalling text document to an output stream. This is designed for use with character encodings that use standard one-byte values for Unicode characters in the 0x20-0x7F range, which includes the most widely used encodings for XML documents. It needs to be subclassed with implementation methods specific to the encoding used.
| Field Summary | |
|---|---|
| static int | DEFAULT_BUFFER_SIZEDefault output buffer size. | 
| Constructor Summary | |
|---|---|
| StreamWriterBase(StreamWriterBase base,
                 java.lang.String[] uris)Copy constructor. | |
| StreamWriterBase(java.lang.String enc,
                 java.lang.String[] uris)Constructor using default buffer size. | |
| Method Summary | |
|---|---|
|  void | close()Close document output. | 
|  void | flush()Flush document output. | 
|  java.lang.String | getEncodingName()Get the name of the character encoding used by this writer. | 
|  void | indent()Request output indent. | 
|  void | indent(int bias)Request output indent. | 
|  void | popExtensionNamespaces()Remove extension namespace URIs. | 
|  void | pushExtensionNamespaces(java.lang.String[] uris)Append extension namespace URIs to those in mapping. | 
|  void | reset()Reset to initial state for reuse. | 
|  void | setIndentSpaces(int count,
                java.lang.String newline,
                char indent)Set nesting indentation. | 
|  void | setNamespaceUris(java.lang.String[] uris)Set namespace URIs. | 
|  void | setOutput(java.io.OutputStream outs)Set output stream. | 
| Methods inherited from class org.jibx.runtime.impl.XMLWriterBase | 
|---|
| addAttribute, closeEmptyTag, closeStartTag, endTag, 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 | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Methods inherited from interface org.jibx.runtime.IExtensibleWriter | 
|---|
| createChildWriter | 
| Methods inherited from interface org.jibx.runtime.IXMLWriter | 
|---|
| getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, openNamespaces, writeCData, writeTextContent | 
| Field Detail | 
|---|
public static final int DEFAULT_BUFFER_SIZE
| Constructor Detail | 
|---|
public StreamWriterBase(java.lang.String enc,
                        java.lang.String[] uris)
enc - character encoding used for output to streams (upper case)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")
public StreamWriterBase(StreamWriterBase base,
                        java.lang.String[] uris)
base - instance to be used as base for writeruris - ordered array of URIs for namespaces used in document
 (see StreamWriterBase(String, String[]))| Method Detail | 
|---|
public java.lang.String getEncodingName()
public void setOutput(java.io.OutputStream outs)
outs - stream for document data output
public void setNamespaceUris(java.lang.String[] uris)
                      throws java.io.IOException
uris - ordered array of URIs for namespaces used in document
java.io.IOException
public void setIndentSpaces(int count,
                            java.lang.String newline,
                            char indent)
count - number of character to indent per level, or disable
 indentation if negative (zero means new line only)newline - sequence of characters used for a line ending
 (null means use the single character '\n')indent - whitespace character used for indentationpublic void pushExtensionNamespaces(java.lang.String[] uris)
pushExtensionNamespaces in interface IXMLWriterpushExtensionNamespaces in class XMLWriterNamespaceBaseuris - namespace URIs to extend those in mappingpublic void popExtensionNamespaces()
pushExtensionNamespaces(java.lang.String[]).
popExtensionNamespaces in interface IXMLWriterpopExtensionNamespaces in class XMLWriterNamespaceBase
public void indent(int bias)
            throws java.io.IOException
bias - indent depth difference (positive or negative) from current
 element nesting depth
java.io.IOException - on error writing to document
public void indent()
            throws java.io.IOException
java.io.IOException - on error writing to document
public void flush()
           throws java.io.IOException
flush in interface IXMLWriterflush in class XMLWriterBasejava.io.IOException - on error writing to document
public void close()
           throws java.io.IOException
close in interface IXMLWriterclose in class XMLWriterBasejava.io.IOException - on error writing to documentpublic void reset()
reset in interface IXMLWriterreset in class XMLWriterBase| 
 | ||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||