IExtensibleWriter, IXMLWriterISO88591StreamWriter, UTF8StreamWriterpublic abstract class StreamWriterBase extends XMLWriterBase
| Modifier and Type | Field | Description |
|---|---|---|
protected byte[] |
m_ampEntityBytes |
|
private StreamWriterBase |
m_baseWriter |
Original writer (only used when created using copy constructor,
null otherwise). |
protected byte[] |
m_buffer |
Cached reference to byte array used by buffer.
|
private IOutByteBuffer |
m_byteBuffer |
Output buffer.
|
protected byte[] |
m_cdataEndBytes |
|
protected byte[] |
m_cdataStartBytes |
|
private java.lang.String |
m_encodingName |
Name of encoding used for stream.
|
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 |
|
private boolean |
m_indent |
Indent tags for pretty-printed text.
|
private int |
m_indentBase |
Base number of characters in indent sequence (end of line only).
|
private int |
m_indentPerLevel |
Number of extra characters in indent sequence per level of nesting.
|
private byte[] |
m_indentSequence |
Raw text for indentation sequences.
|
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 | Description |
|---|---|---|
protected |
StreamWriterBase(java.lang.String enc,
java.lang.String[] uris) |
Constructor with supplied buffer.
|
|
StreamWriterBase(StreamWriterBase base,
java.lang.String[] uris) |
Copy constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
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.
|
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(java.lang.String[] uris) |
Append extension namespace URIs to those in mapping.
|
void |
setBuffer(IOutByteBuffer buff) |
Set the byte buffer.
|
void |
setIndentSpaces(int count,
java.lang.String newline,
char indent) |
Set nesting indentation.
|
void |
setNamespaceUris(java.lang.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.
|
createChildWritergetExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, openNamespaces, popTranslationTable, pushTranslationTable, writeCData, writeTextContentclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddAttribute, 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, translateNamespaceprotected 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
private IOutByteBuffer m_byteBuffer
private final java.lang.String m_encodingName
private final StreamWriterBase m_baseWriter
null otherwise).protected byte[] m_buffer
protected int m_fillOffset
protected byte[][] m_prefixBytes
protected byte[][][] m_extensionBytes
private boolean m_indent
private int m_indentBase
private int m_indentPerLevel
private byte[] m_indentSequence
protected 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[]))public void setBuffer(IOutByteBuffer buff)
buff - public java.lang.String getEncodingName()
public void setNamespaceUris(java.lang.String[] uris)
throws java.io.IOException
uris - ordered array of URIs for namespaces used in documentjava.io.IOExceptionpublic 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 indentationprotected void makeSpace(int length)
throws java.io.IOException
length - number of bytes space to be made availablejava.io.IOException - if error writing to documentprotected void undefineNamespace(int index)
undefineNamespace in class XMLWriterNamespaceBaseindex - post-translation namespace URI index numberprotected void writePrefix(int index)
throws java.io.IOException
writePrefix in class XMLWriterBaseindex - namespace URI index numberjava.io.IOException - if error writing to documentprotected int writeEntity(byte[] bytes,
int offset)
bytes - actual bytes to be writtenoffset - starting offset in bufferpublic 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 XMLWriterNamespaceBasepublic void indent(int bias)
throws java.io.IOException
indent in class XMLWriterBasebias - indent depth difference (positive or negative) from current
element nesting depthjava.io.IOException - on error writing to documentpublic void indent()
throws java.io.IOException
java.io.IOException - on error writing to documentpublic void flush()
throws java.io.IOException
flush in interface IXMLWriterflush in class XMLWriterBasejava.io.IOException - on error writing to documentpublic void close()
throws java.io.IOException
close in interface IXMLWriterclose in class XMLWriterBasejava.io.IOException - on error writing to document