public final class Utf8XmlWriter extends ByteXmlWriter
XmlWriter
, used if
the destination is byte-based OutputStream
, and
encoding is UTF-8._charTypes, _out, _outputBuffer, _outputBufferLen, _outputPtr, _surrogate
_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 |
---|
Utf8XmlWriter(WriterConfig cfg,
OutputStream out) |
Modifier and Type | Method and Description |
---|---|
protected WName |
doConstructName(String localName) |
protected WName |
doConstructName(String prefix,
String localName) |
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 void |
output2ByteChar(int ch) |
protected int |
outputMultiByteChar(int ch,
char[] cbuf,
int inputOffset,
int inputLen)
Method called to output a character that is beyond range of
1- and 2-byte UTF-8 encodings.
|
protected int |
outputStrictMultiByteChar(int ch,
char[] cbuf,
int inputOffset,
int inputLen)
Method called to output a character beyond basic 1- or 2-byte
encoding (code 0x0800 and above), without being able to use
character entities
|
protected void |
outputSurrogates(int surr1,
int surr2)
Method called to output a composite character, result of
combining 2 surrogate characters.
|
void |
writeRaw(char[] cbuf,
int offset,
int len)
This method is heavily encoding-dependant, so it needs
to be deferred to sub-classes
|
_closeTarget, _releaseBuffers, calcSurrogate, constructName, constructName, fastWriteAttrValue, flush, flushBuffer, getAscii, getAscii, getAscii, getOutputPtr, throwUnpairedSurrogate, throwUnpairedSurrogate, verifyNameComponent, writeAsEntity, writeAttribute, writeAttribute, writeAttribute, writeAttrValue, writeCData, writeCData, writeCDataContents, writeCDataEnd, writeCDataStart, writeCharacters, writeCharacters, writeComment, writeCommentContents, writeCommentEnd, writeCommentStart, writeDTD, writeDTD, writeEndTag, writeEntityReference, writeLongAttribute, writeName, writeName, writeName, writePI, writePIData, writeRaw, writeRaw, writeRaw, writeRaw, writeRaw, writeSpace, writeSpace, writeStartTagEmptyEnd, writeStartTagEnd, writeStartTagStart, writeTypedValue, writeXmlDeclaration
close, enableXml11, getAbsOffset, getColumn, getRow, guessEncodingBitSize, reportFailedEscaping, reportInvalidChar, reportInvalidEmptyName, reportNwfContent, reportNwfContent, reportNwfName, reportNwfName, throwOutputError, throwOutputError
public Utf8XmlWriter(WriterConfig cfg, OutputStream out)
public int getHighestEncodable()
XmlWriter
getHighestEncodable
in class XmlWriter
public void writeRaw(char[] cbuf, int offset, int len) throws IOException, XMLStreamException
ByteXmlWriter
writeRaw
in class ByteXmlWriter
IOException
XMLStreamException
protected WName doConstructName(String localName) throws XMLStreamException
doConstructName
in class ByteXmlWriter
XMLStreamException
protected WName doConstructName(String prefix, String localName) throws XMLStreamException
doConstructName
in class ByteXmlWriter
XMLStreamException
protected final void outputSurrogates(int surr1, int surr2) throws IOException, XMLStreamException
ByteXmlWriter
outputSurrogates
in class ByteXmlWriter
IOException
XMLStreamException
protected final void output2ByteChar(int ch) throws IOException, XMLStreamException
output2ByteChar
in class ByteXmlWriter
IOException
XMLStreamException
protected final int outputMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws IOException, XMLStreamException
outputMultiByteChar
in class ByteXmlWriter
inputOffset
- Input pointer after character has been handled;
either same as one passed in, or one more if a surrogate character
was succesfully handledIOException
XMLStreamException
protected final int outputStrictMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws IOException, XMLStreamException
ByteXmlWriter
outputStrictMultiByteChar
in class ByteXmlWriter
IOException
XMLStreamException
Copyright © 2019 FasterXML. All rights reserved.