public abstract class StreamWriterBase extends XMLWriterBase
| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
m_ampEntityBytes |
protected byte[] |
m_buffer
Cached reference to byte array used by buffer.
|
protected byte[] |
m_cdataEndBytes |
protected byte[] |
m_cdataStartBytes |
protected byte[][][] |
m_extensionBytes
Byte sequences for prefixes of extension namespaces in scope.
|
protected int |
m_fillOffset
Current fill offset in buffer byte array.
|
protected byte[] |
m_gtEntityBytes |
protected byte[] |
m_ltEntityBytes |
protected byte[][] |
m_prefixBytes
Byte sequences for prefixes of namespaces in scope.
|
protected byte[] |
m_quotEntityBytes |
m_prefixes, m_uris| Modifier | Constructor and Description |
|---|---|
|
StreamWriterBase(StreamWriterBase base,
String[] uris)
Copy constructor.
|
protected |
StreamWriterBase(String enc,
String[] uris)
Constructor with supplied buffer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close document output.
|
void |
flush()
Flush document output.
|
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.
|
protected void |
makeSpace(int length)
Make at least the requested number of bytes available in the output
buffer.
|
void |
popExtensionNamespaces()
Remove extension namespace URIs.
|
void |
pushExtensionNamespaces(String[] uris)
Append extension namespace URIs to those in mapping.
|
void |
setBuffer(IOutByteBuffer buff)
Set the byte buffer.
|
void |
setIndentSpaces(int count,
String newline,
char indent)
Set nesting indentation.
|
void |
setNamespaceUris(String[] uris)
Set namespace URIs.
|
protected void |
undefineNamespace(int index)
Report that namespace has been undefined.
|
protected int |
writeEntity(byte[] bytes,
int offset)
Write entity bytes to output.
|
protected void |
writePrefix(int index)
Write namespace prefix to output.
|
addAttribute, closeEmptyTag, closeStartTag, endTag, flagContent, flagTextContent, init, reset, startTagClosed, startTagNamespaces, startTagOpen, writeAttributeText, writeComment, writeDocType, writeEntityRef, writeMarkup, writeMarkup, writePI, writeXMLDecldecrementNesting, defineNamespace, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, internalNamespacePrefix, internalNamespaceUri, internalSetUris, openNamespaces, popTranslationTable, pushTranslationTable, shrinkArray, translateNamespaceclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateChildWritergetExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, openNamespaces, popTranslationTable, pushTranslationTable, writeCData, writeTextContentprotected final byte[] m_quotEntityBytes
protected final byte[] m_ampEntityBytes
protected final byte[] m_gtEntityBytes
protected final byte[] m_ltEntityBytes
protected final byte[] m_cdataStartBytes
protected final byte[] m_cdataEndBytes
protected byte[] m_buffer
protected int m_fillOffset
protected byte[][] m_prefixBytes
protected byte[][][] m_extensionBytes
protected StreamWriterBase(String enc, 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, String[] uris)
base - instance to be used as base for writeruris - ordered array of URIs for namespaces used in document
(see StreamWriterBase(String, String[]))public void setBuffer(IOutByteBuffer buff)
buff - public String getEncodingName()
public void setNamespaceUris(String[] uris) throws IOException
uris - ordered array of URIs for namespaces used in documentIOExceptionpublic void setIndentSpaces(int count,
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 indentationprotected void makeSpace(int length)
throws IOException
length - number of bytes space to be made availableIOException - if error writing to documentprotected void undefineNamespace(int index)
undefineNamespace in class XMLWriterNamespaceBaseindex - post-translation namespace URI index numberprotected void writePrefix(int index)
throws IOException
writePrefix in class XMLWriterBaseindex - namespace URI index numberIOException - if error writing to documentprotected int writeEntity(byte[] bytes,
int offset)
bytes - actual bytes to be writtenoffset - starting offset in bufferpublic void pushExtensionNamespaces(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 XMLWriterNamespaceBasepublic void indent(int bias)
throws IOException
indent in class XMLWriterBasebias - indent depth difference (positive or negative) from current
element nesting depthIOException - on error writing to documentpublic void indent()
throws IOException
IOException - on error writing to documentpublic void flush()
throws IOException
flush in interface IXMLWriterflush in class XMLWriterBaseIOException - on error writing to documentpublic void close()
throws IOException
close in interface IXMLWriterclose in class XMLWriterBaseIOException - on error writing to documentCopyright © 2005-2014 jibx.org. All Rights Reserved.