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, throwOutputErrorprotected 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 XmlWriterpublic int getHighestEncodable()
XmlWritergetHighestEncodable in class XmlWriterpublic WName constructName(String localName)
constructName in class XmlWriterpublic WName constructName(String prefix, String localName)
constructName in class XmlWriterpublic void _releaseBuffers()
_releaseBuffers in class XmlWriterpublic void _closeTarget(boolean doClose)
throws IOException
_closeTarget in class XmlWriterIOExceptionpublic final void flush()
throws IOException
flush in class XmlWriterIOExceptionpublic void writeRaw(char[] cbuf,
int offset,
int len)
throws IOException
writeRaw in class XmlWriterIOExceptionpublic void writeRaw(String str, int offset, int len) throws IOException
writeRaw in class XmlWriterIOExceptionpublic final void writeCDataStart()
throws IOException
IOExceptionpublic final void writeCDataEnd()
throws IOException
IOExceptionpublic final void writeCommentStart()
throws IOException
IOExceptionpublic final void writeCommentEnd()
throws IOException
IOExceptionpublic int writeCData(String data) throws IOException, XMLStreamException
writeCData in class XmlWriterdata - Contents of the CDATA section to write outIOExceptionXMLStreamExceptionpublic int writeCData(char[] cbuf,
int offset,
int len)
throws IOException,
XMLStreamException
writeCData in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeCharacters(String text) throws IOException, XMLStreamException
writeCharacters in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeCharacters(char[] cbuf,
int offset,
int len)
throws IOException,
XMLStreamException
writeCharacters in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeSpace(String data) throws IOException, XMLStreamException
writeSpace in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeSpace(char[] cbuf,
int offset,
int len)
throws IOException,
XMLStreamException
writeSpace in class XmlWriterIOExceptionXMLStreamExceptionpublic int writeComment(String data) throws IOException, XMLStreamException
writeComment in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeDTD(String data) throws IOException, XMLStreamException
XmlWriterwriteDTD in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeDTD(WName rootName, String systemId, String publicId, String internalSubset) throws IOException, XMLStreamException
writeDTD in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeEntityReference(WName name) throws IOException, XMLStreamException
writeEntityReference in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeXmlDeclaration(String version, String encoding, String standalone) throws IOException, XMLStreamException
writeXmlDeclaration in class XmlWriterIOExceptionXMLStreamExceptionpublic int writePI(WName target, String data) throws IOException, XMLStreamException
writePI in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeStartTagStart(WName name) throws IOException, XMLStreamException
XmlWriterNote: 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 XmlWriterIOExceptionXMLStreamExceptionpublic void writeStartTagEnd()
throws IOException,
XMLStreamException
writeStartTagEnd in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeStartTagEmptyEnd()
throws IOException
writeStartTagEmptyEnd in class XmlWriterIOExceptionpublic void writeEndTag(WName name) throws IOException, XMLStreamException
writeEndTag in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeAttribute(WName name, String value) throws IOException, XMLStreamException
XmlWriterNote: 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 XmlWriterIOExceptionXMLStreamExceptionpublic void writeAttribute(WName name, char[] value, int offset, int vlen) throws IOException, XMLStreamException
writeAttribute in class XmlWriterIOExceptionXMLStreamExceptionpublic void writeTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)
throws IOException,
XMLStreamException
writeTypedValue in class XmlWriterIOExceptionXMLStreamExceptionpublic final void writeAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws IOException, XMLStreamException
writeAttribute in class XmlWriterIOExceptionXMLStreamExceptionprotected final void writeName(WName name) throws IOException
IOExceptionprotected 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
IOExceptionprotected void writeSegmentedCData(char[] c,
int start,
int len,
int index)
throws IOException
IOExceptionprotected void writeSegmentedComment(String content, int index) throws IOException
IOExceptionprotected final void writeAsEntity(int c)
throws IOException
IOExceptionCopyright © 2021 FasterXML. All rights reserved.