public final class CharXmlWriter extends XmlWriter
Modifier and Type | Field and Description |
---|---|
protected Writer |
_out
Actual Writer to use for outputting buffered data as appropriate.
|
protected char[] |
_outputBuffer |
protected int |
_outputBufferLen |
protected int |
_outputPtr |
protected int |
mSmallWriteSize
This is the threshold used to check what is considered a "small"
write; small writes will be buffered until resulting size will
be above the threshold.
|
_cfgNsAware, _checkContent, _checkNames, _config, _copyBuffer, _copyBufferLen, _locPastChars, _locRowNr, _locRowStartOffset, _xml11, ATTR_MIN_ARRAYCOPY, DEFAULT_COPYBUFFER_LEN, MIN_ARRAYCOPY, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST
Constructor and Description |
---|
CharXmlWriter(WriterConfig cfg,
Writer out) |
Modifier and Type | Method and Description |
---|---|
void |
_closeTarget(boolean doClose) |
void |
_releaseBuffers() |
WName |
constructName(String localName) |
WName |
constructName(String prefix,
String localName) |
void |
flush() |
int |
getHighestEncodable()
Method called by error reporting code, to figure out if a given
character is encodable (without using character entities) with
the current encoding or not.
|
protected int |
getOutputPtr() |
protected int |
verifyCDataContent(char[] c,
int start,
int end) |
protected int |
verifyCDataContent(String content) |
protected int |
verifyCommentContent(String content) |
protected void |
writeAsEntity(int c) |
void |
writeAttribute(WName name,
org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) |
void |
writeAttribute(WName name,
char[] value,
int offset,
int vlen) |
void |
writeAttribute(WName name,
String value)
Note: can throw XMLStreamException, if name checking is enabled,
and name is invalid (name check has to be in this writer, not
caller, since it depends not only on xml limitations, but also
on encoding limitations)
|
int |
writeCData(char[] cbuf,
int offset,
int len) |
int |
writeCData(String data) |
void |
writeCDataEnd() |
void |
writeCDataStart() |
void |
writeCharacters(char[] cbuf,
int offset,
int len) |
void |
writeCharacters(String text) |
int |
writeComment(String data)
Method that will try to output the content as specified.
|
void |
writeCommentEnd() |
void |
writeCommentStart() |
void |
writeDTD(String data)
Older "legacy" output method for outputting DOCTYPE declaration.
|
void |
writeDTD(WName rootName,
String systemId,
String publicId,
String internalSubset) |
void |
writeEndTag(WName name) |
void |
writeEntityReference(WName name) |
protected void |
writeName(WName name) |
int |
writePI(WName target,
String data) |
void |
writeRaw(char[] cbuf,
int offset,
int len) |
void |
writeRaw(String str,
int offset,
int len) |
protected void |
writeSegmentedCData(char[] c,
int start,
int len,
int index) |
protected void |
writeSegmentedCData(String content,
int index) |
protected void |
writeSegmentedComment(String content,
int index) |
void |
writeSpace(char[] cbuf,
int offset,
int len) |
void |
writeSpace(String data) |
void |
writeStartTagEmptyEnd() |
void |
writeStartTagEnd() |
void |
writeStartTagStart(WName name)
Note: can throw XMLStreamException, if name checking is enabled,
and name is invalid (name check has to be in this writer, not
caller, since it depends not only on xml limitations, but also
on encoding limitations)
|
void |
writeTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) |
void |
writeXmlDeclaration(String version,
String encoding,
String standalone) |
close, enableXml11, getAbsOffset, getColumn, getRow, guessEncodingBitSize, reportFailedEscaping, reportInvalidChar, reportInvalidEmptyName, reportNwfContent, reportNwfContent, reportNwfName, reportNwfName, throwOutputError, throwOutputError
protected final int mSmallWriteSize
protected Writer _out
protected char[] _outputBuffer
protected int _outputPtr
protected final int _outputBufferLen
public CharXmlWriter(WriterConfig cfg, Writer out)
protected int getOutputPtr()
getOutputPtr
in class XmlWriter
public int getHighestEncodable()
XmlWriter
getHighestEncodable
in class XmlWriter
public WName constructName(String localName)
constructName
in class XmlWriter
public WName constructName(String prefix, String localName)
constructName
in class XmlWriter
public void _releaseBuffers()
_releaseBuffers
in class XmlWriter
public void _closeTarget(boolean doClose) throws IOException
_closeTarget
in class XmlWriter
IOException
public final void flush() throws IOException
flush
in class XmlWriter
IOException
public void writeRaw(char[] cbuf, int offset, int len) throws IOException
writeRaw
in class XmlWriter
IOException
public void writeRaw(String str, int offset, int len) throws IOException
writeRaw
in class XmlWriter
IOException
public final void writeCDataStart() throws IOException
IOException
public final void writeCDataEnd() throws IOException
IOException
public final void writeCommentStart() throws IOException
IOException
public final void writeCommentEnd() throws IOException
IOException
public int writeCData(String data) throws IOException, XMLStreamException
writeCData
in class XmlWriter
data
- Contents of the CDATA section to write outIOException
XMLStreamException
public int writeCData(char[] cbuf, int offset, int len) throws IOException, XMLStreamException
writeCData
in class XmlWriter
IOException
XMLStreamException
public void writeCharacters(String text) throws IOException, XMLStreamException
writeCharacters
in class XmlWriter
IOException
XMLStreamException
public void writeCharacters(char[] cbuf, int offset, int len) throws IOException, XMLStreamException
writeCharacters
in class XmlWriter
IOException
XMLStreamException
public void writeSpace(String data) throws IOException, XMLStreamException
writeSpace
in class XmlWriter
IOException
XMLStreamException
public void writeSpace(char[] cbuf, int offset, int len) throws IOException, XMLStreamException
writeSpace
in class XmlWriter
IOException
XMLStreamException
public int writeComment(String data) throws IOException, XMLStreamException
writeComment
in class XmlWriter
IOException
XMLStreamException
public void writeDTD(String data) throws IOException, XMLStreamException
XmlWriter
writeDTD
in class XmlWriter
IOException
XMLStreamException
public void writeDTD(WName rootName, String systemId, String publicId, String internalSubset) throws IOException, XMLStreamException
writeDTD
in class XmlWriter
IOException
XMLStreamException
public void writeEntityReference(WName name) throws IOException, XMLStreamException
writeEntityReference
in class XmlWriter
IOException
XMLStreamException
public void writeXmlDeclaration(String version, String encoding, String standalone) throws IOException, XMLStreamException
writeXmlDeclaration
in class XmlWriter
IOException
XMLStreamException
public int writePI(WName target, String data) throws IOException, XMLStreamException
writePI
in class XmlWriter
IOException
XMLStreamException
public void writeStartTagStart(WName name) throws IOException, XMLStreamException
XmlWriter
Note: can throw XMLStreamException, if name checking is enabled, and name is invalid (name check has to be in this writer, not caller, since it depends not only on xml limitations, but also on encoding limitations)
writeStartTagStart
in class XmlWriter
IOException
XMLStreamException
public void writeStartTagEnd() throws IOException, XMLStreamException
writeStartTagEnd
in class XmlWriter
IOException
XMLStreamException
public void writeStartTagEmptyEnd() throws IOException
writeStartTagEmptyEnd
in class XmlWriter
IOException
public void writeEndTag(WName name) throws IOException, XMLStreamException
writeEndTag
in class XmlWriter
IOException
XMLStreamException
public void writeAttribute(WName name, String value) throws IOException, XMLStreamException
XmlWriter
Note: can throw XMLStreamException, if name checking is enabled, and name is invalid (name check has to be in this writer, not caller, since it depends not only on xml limitations, but also on encoding limitations)
writeAttribute
in class XmlWriter
IOException
XMLStreamException
public void writeAttribute(WName name, char[] value, int offset, int vlen) throws IOException, XMLStreamException
writeAttribute
in class XmlWriter
IOException
XMLStreamException
public void writeTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws IOException, XMLStreamException
writeTypedValue
in class XmlWriter
IOException
XMLStreamException
public final void writeAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws IOException, XMLStreamException
writeAttribute
in class XmlWriter
IOException
XMLStreamException
protected final void writeName(WName name) throws IOException
IOException
protected int verifyCDataContent(String content)
protected int verifyCDataContent(char[] c, int start, int end)
protected int verifyCommentContent(String content)
protected void writeSegmentedCData(String content, int index) throws IOException
IOException
protected void writeSegmentedCData(char[] c, int start, int len, int index) throws IOException
IOException
protected void writeSegmentedComment(String content, int index) throws IOException
IOException
protected final void writeAsEntity(int c) throws IOException
IOException
Copyright © 2018 FasterXML. All rights reserved.