Package com.fasterxml.aalto.out
Class ByteXmlWriter
- java.lang.Object
-
- com.fasterxml.aalto.out.WNameFactory
-
- com.fasterxml.aalto.out.XmlWriter
-
- com.fasterxml.aalto.out.ByteXmlWriter
-
- Direct Known Subclasses:
SingleByteXmlWriter,Utf8XmlWriter
public abstract class ByteXmlWriter extends XmlWriter
This abstract base class (partial implementation ofXmlWriter) is used if the destination is byte-basedOutputStream.Further, all existing implementations are for encodings that are 7-bit ascii compatible. This is important since this means that marker and separator characters are identical independent of actual encoding. This would not hold if support for encodings like EBCDIC were supported using this class.
-
-
Field Summary
Fields Modifier and Type Field Description protected XmlCharTypes_charTypesValidation tables used for verifying validity (and need for quoting)protected java.io.OutputStream_outActual Writer to use for outputting buffered data as appropriate.protected byte[]_outputBufferprotected int_outputBufferLenprotected int_outputPtrprotected int_surrogateIn case a split surrogate pair is output (which can occur for only some of the methods, possibly depending on encoding), the first part is temporarily stored within this member variable.(package private) static byteBYTE_A(package private) static byteBYTE_AMP(package private) static byteBYTE_APOS(package private) static byteBYTE_COLON(package private) static byteBYTE_EQ(package private) static byteBYTE_G(package private) static byteBYTE_GT(package private) static byteBYTE_HASH(package private) static byteBYTE_HYPHEN(package private) static byteBYTE_L(package private) static byteBYTE_LBRACKET(package private) static byteBYTE_LT(package private) static byteBYTE_M(package private) static byteBYTE_O(package private) static byteBYTE_P(package private) static byteBYTE_Q(package private) static byteBYTE_QMARK(package private) static byteBYTE_QUOT(package private) static byteBYTE_RBRACKET(package private) static byteBYTE_S(package private) static byteBYTE_SEMICOLON(package private) static byteBYTE_SLASH(package private) static byteBYTE_SPACE(package private) static byteBYTE_T(package private) static byteBYTE_U(package private) static byteBYTE_X(package private) static byte[]BYTES_CDATA_END(package private) static byte[]BYTES_CDATA_START(package private) static byte[]BYTES_COMMENT_END(package private) static byte[]BYTES_COMMENT_START(package private) static byte[]BYTES_XMLDECL_ENCODING(package private) static byte[]BYTES_XMLDECL_STANDALONE(package private) static byte[]BYTES_XMLDECL_START(package private) static intDEFAULT_COPY_BUFFER_SIZEDefault intermediate copy buffer size, to be used for efficient access to String content.(package private) static intDEFAULT_FULL_BUFFER_SIZEAnd this value determines size of the intermediate copy buffer to use.(package private) static intSMALL_WRITELet's try avoid short writes, since some output streams have high per-call penalty (like network streams).-
Fields inherited from class com.fasterxml.aalto.out.XmlWriter
_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 Summary
Constructors Modifier Constructor Description protectedByteXmlWriter(WriterConfig cfg, java.io.OutputStream out, XmlCharTypes charTypes)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void_closeTarget(boolean doClose)void_releaseBuffers()protected intcalcSurrogate(int surr1, int surr2, java.lang.String context)WNameconstructName(java.lang.String localName)WNameconstructName(java.lang.String prefix, java.lang.String localName)protected abstract WNamedoConstructName(java.lang.String localName)protected abstract WNamedoConstructName(java.lang.String prefix, java.lang.String localName)protected intfastWriteAttrValue(char[] vbuf, int offset, int len, byte[] bbuf, int ptr)Method called to copy given attribute value, when it's known that it will completely fit in the output buffer without further checksvoidflush()protected voidflushBuffer()protected static byte[]getAscii(java.lang.String str)protected static voidgetAscii(java.lang.String str, byte[] result)protected static voidgetAscii(java.lang.String str, byte[] result, int offset)protected intgetOutputPtr()private voidlongWriteCharacters(java.lang.String text)protected abstract voidoutput2ByteChar(int ch)protected abstract intoutputMultiByteChar(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); possibly using character entities, if necessaryprotected abstract intoutputStrictMultiByteChar(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 entitiesprotected abstract voidoutputSurrogates(int surr1, int surr2)Method called to output a composite character, result of combining 2 surrogate characters.protected voidthrowUnpairedSurrogate()protected voidthrowUnpairedSurrogate(int code)protected voidverifyNameComponent(java.lang.String part)Method used to verify that a name component (prefix, local name) is a legal as per xml 1.0 specification.protected voidwriteAsEntity(int c)voidwriteAttribute(WName name, char[] vbuf, int offset, int vlen)voidwriteAttribute(WName name, java.lang.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)voidwriteAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)private voidwriteAttrNameEqQ(WName name)protected voidwriteAttrValue(char[] vbuf, int offset, int len)intwriteCData(char[] cbuf, int offset, int len)intwriteCData(java.lang.String data)protected intwriteCDataContents(char[] cbuf, int offset, int len)protected voidwriteCDataEnd()protected voidwriteCDataStart()voidwriteCharacters(char[] cbuf, int offset, int len)voidwriteCharacters(java.lang.String text)intwriteComment(java.lang.String data)Method that will try to output the content as specified.protected intwriteCommentContents(char[] cbuf, int offset, int len)Note: the only way to fix comment contents is to inject a space to split up consecutive '--' (or '-' that ends a comment).protected voidwriteCommentEnd()protected voidwriteCommentStart()voidwriteDTD(WName rootName, java.lang.String systemId, java.lang.String publicId, java.lang.String internalSubset)voidwriteDTD(java.lang.String data)Older "legacy" output method for outputting DOCTYPE declaration.voidwriteEndTag(WName name)voidwriteEntityReference(WName name)protected voidwriteLongAttribute(WName name, java.lang.String value, int vlen)protected voidwriteName(byte preChar, WName name)protected voidwriteName(WName name)protected voidwriteName(WName name, byte postChar)intwritePI(WName target, java.lang.String data)protected intwritePIData(char[] cbuf, int offset, int len)protected voidwriteRaw(byte b)protected voidwriteRaw(byte[] buf)protected voidwriteRaw(byte[] buf, int offset, int len)protected voidwriteRaw(byte b1, byte b2)abstract voidwriteRaw(char[] cbuf, int offset, int len)This method is heavily encoding-dependant, so it needs to be deferred to sub-classesvoidwriteRaw(java.lang.String text, int offset, int len)voidwriteSpace(char[] cbuf, int offset, int len)voidwriteSpace(java.lang.String data)private voidwriteSplitCharacters(char[] cbuf, int offset, int len)This method is called when it is possible that the output may cross the output buffer boundary.voidwriteStartTagEmptyEnd()voidwriteStartTagEnd()voidwriteStartTagStart(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)voidwriteTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)voidwriteXmlDeclaration(java.lang.String version, java.lang.String encoding, java.lang.String standalone)-
Methods inherited from class com.fasterxml.aalto.out.XmlWriter
close, enableXml11, getAbsOffset, getColumn, getHighestEncodable, getRow, guessEncodingBitSize, reportFailedEscaping, reportInvalidChar, reportInvalidEmptyName, reportNwfContent, reportNwfContent, reportNwfName, reportNwfName, throwOutputError, throwOutputError
-
-
-
-
Field Detail
-
DEFAULT_FULL_BUFFER_SIZE
static final int DEFAULT_FULL_BUFFER_SIZE
And this value determines size of the intermediate copy buffer to use.- See Also:
- Constant Field Values
-
DEFAULT_COPY_BUFFER_SIZE
static final int DEFAULT_COPY_BUFFER_SIZE
Default intermediate copy buffer size, to be used for efficient access to String content. Smaller, since it's in characters, plus will not be used for actual write operations- See Also:
- Constant Field Values
-
SMALL_WRITE
static final int SMALL_WRITE
Let's try avoid short writes, since some output streams have high per-call penalty (like network streams).- See Also:
- Constant Field Values
-
BYTE_SPACE
static final byte BYTE_SPACE
- See Also:
- Constant Field Values
-
BYTE_COLON
static final byte BYTE_COLON
- See Also:
- Constant Field Values
-
BYTE_SEMICOLON
static final byte BYTE_SEMICOLON
- See Also:
- Constant Field Values
-
BYTE_LBRACKET
static final byte BYTE_LBRACKET
- See Also:
- Constant Field Values
-
BYTE_RBRACKET
static final byte BYTE_RBRACKET
- See Also:
- Constant Field Values
-
BYTE_QMARK
static final byte BYTE_QMARK
- See Also:
- Constant Field Values
-
BYTE_EQ
static final byte BYTE_EQ
- See Also:
- Constant Field Values
-
BYTE_SLASH
static final byte BYTE_SLASH
- See Also:
- Constant Field Values
-
BYTE_HASH
static final byte BYTE_HASH
- See Also:
- Constant Field Values
-
BYTE_HYPHEN
static final byte BYTE_HYPHEN
- See Also:
- Constant Field Values
-
BYTE_LT
static final byte BYTE_LT
- See Also:
- Constant Field Values
-
BYTE_GT
static final byte BYTE_GT
- See Also:
- Constant Field Values
-
BYTE_AMP
static final byte BYTE_AMP
- See Also:
- Constant Field Values
-
BYTE_QUOT
static final byte BYTE_QUOT
- See Also:
- Constant Field Values
-
BYTE_APOS
static final byte BYTE_APOS
- See Also:
- Constant Field Values
-
BYTE_A
static final byte BYTE_A
- See Also:
- Constant Field Values
-
BYTE_G
static final byte BYTE_G
- See Also:
- Constant Field Values
-
BYTE_L
static final byte BYTE_L
- See Also:
- Constant Field Values
-
BYTE_M
static final byte BYTE_M
- See Also:
- Constant Field Values
-
BYTE_O
static final byte BYTE_O
- See Also:
- Constant Field Values
-
BYTE_P
static final byte BYTE_P
- See Also:
- Constant Field Values
-
BYTE_Q
static final byte BYTE_Q
- See Also:
- Constant Field Values
-
BYTE_S
static final byte BYTE_S
- See Also:
- Constant Field Values
-
BYTE_T
static final byte BYTE_T
- See Also:
- Constant Field Values
-
BYTE_U
static final byte BYTE_U
- See Also:
- Constant Field Values
-
BYTE_X
static final byte BYTE_X
- See Also:
- Constant Field Values
-
BYTES_CDATA_START
static final byte[] BYTES_CDATA_START
-
BYTES_CDATA_END
static final byte[] BYTES_CDATA_END
-
BYTES_COMMENT_START
static final byte[] BYTES_COMMENT_START
-
BYTES_COMMENT_END
static final byte[] BYTES_COMMENT_END
-
BYTES_XMLDECL_START
static final byte[] BYTES_XMLDECL_START
-
BYTES_XMLDECL_ENCODING
static final byte[] BYTES_XMLDECL_ENCODING
-
BYTES_XMLDECL_STANDALONE
static final byte[] BYTES_XMLDECL_STANDALONE
-
_out
protected java.io.OutputStream _out
Actual Writer to use for outputting buffered data as appropriate. During active usage, remains as the writer initially set; set to null when this writer is closed.
-
_outputBuffer
protected byte[] _outputBuffer
-
_outputPtr
protected int _outputPtr
-
_outputBufferLen
protected final int _outputBufferLen
-
_surrogate
protected int _surrogate
In case a split surrogate pair is output (which can occur for only some of the methods, possibly depending on encoding), the first part is temporarily stored within this member variable.
-
_charTypes
protected final XmlCharTypes _charTypes
Validation tables used for verifying validity (and need for quoting)
-
-
Constructor Detail
-
ByteXmlWriter
protected ByteXmlWriter(WriterConfig cfg, java.io.OutputStream out, XmlCharTypes charTypes)
-
-
Method Detail
-
getOutputPtr
protected final int getOutputPtr()
- Specified by:
getOutputPtrin classXmlWriter
-
constructName
public final WName constructName(java.lang.String localName) throws javax.xml.stream.XMLStreamException
- Specified by:
constructNamein classXmlWriter- Throws:
javax.xml.stream.XMLStreamException
-
constructName
public WName constructName(java.lang.String prefix, java.lang.String localName) throws javax.xml.stream.XMLStreamException
- Specified by:
constructNamein classXmlWriter- Throws:
javax.xml.stream.XMLStreamException
-
doConstructName
protected abstract WName doConstructName(java.lang.String localName) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
doConstructName
protected abstract WName doConstructName(java.lang.String prefix, java.lang.String localName) throws javax.xml.stream.XMLStreamException
- Throws:
javax.xml.stream.XMLStreamException
-
verifyNameComponent
protected void verifyNameComponent(java.lang.String part) throws javax.xml.stream.XMLStreamExceptionMethod used to verify that a name component (prefix, local name) is a legal as per xml 1.0 specification.- Throws:
java.lang.IllegalArgumentException- If name component contains an invalid (non-name; or for the initial characters, non-name-first) character.javax.xml.stream.XMLStreamException
-
outputSurrogates
protected abstract void outputSurrogates(int surr1, int surr2) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionMethod called to output a composite character, result of combining 2 surrogate characters.- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
output2ByteChar
protected abstract void output2ByteChar(int ch) throws java.io.IOException, javax.xml.stream.XMLStreamException- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
outputStrictMultiByteChar
protected abstract int outputStrictMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionMethod called to output a character beyond basic 1- or 2-byte encoding (code 0x0800 and above), without being able to use character entities- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
outputMultiByteChar
protected abstract int outputMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionMethod called to output a character beyond basic 1- or 2-byte encoding (code 0x0800 and above); possibly using character entities, if necessary- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
_releaseBuffers
public void _releaseBuffers()
- Overrides:
_releaseBuffersin classXmlWriter
-
_closeTarget
public void _closeTarget(boolean doClose) throws java.io.IOException- Specified by:
_closeTargetin classXmlWriter- Throws:
java.io.IOException
-
flush
public final void flush() throws java.io.IOException
-
writeRaw
public final void writeRaw(java.lang.String text, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
-
writeRaw
public abstract void writeRaw(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionThis method is heavily encoding-dependant, so it needs to be deferred to sub-classes
-
writeStartTagStart
public final void writeStartTagStart(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
Description copied from class: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)
- Specified by:
writeStartTagStartin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeStartTagEnd
public final void writeStartTagEnd() throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeStartTagEndin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeStartTagEmptyEnd
public void writeStartTagEmptyEnd() throws java.io.IOException- Specified by:
writeStartTagEmptyEndin classXmlWriter- Throws:
java.io.IOException
-
writeEndTag
public final void writeEndTag(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeEndTagin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeAttribute
public final void writeAttribute(WName name, java.lang.String value) throws java.io.IOException, javax.xml.stream.XMLStreamException
Description copied from class: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)
- Specified by:
writeAttributein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeAttribute
public final void writeAttribute(WName name, char[] vbuf, int offset, int vlen) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeAttributein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
fastWriteAttrValue
protected final int fastWriteAttrValue(char[] vbuf, int offset, int len, byte[] bbuf, int ptr) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionMethod called to copy given attribute value, when it's known that it will completely fit in the output buffer without further checks- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeAttrValue
protected final void writeAttrValue(char[] vbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeLongAttribute
protected final void writeLongAttribute(WName name, java.lang.String value, int vlen) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeName
protected final void writeName(WName name) throws java.io.IOException
- Throws:
java.io.IOException
-
writeName
protected final void writeName(byte preChar, WName name) throws java.io.IOException- Throws:
java.io.IOException
-
writeName
protected final void writeName(WName name, byte postChar) throws java.io.IOException
- Throws:
java.io.IOException
-
writeAttrNameEqQ
private final void writeAttrNameEqQ(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCData
public int writeCData(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeCDatain classXmlWriter- Parameters:
data- Contents of the CDATA section to write out- Returns:
- -1 to indicate succesful write, or index of the problematic character in input (first ']' from "]]>" sequence, in non-fixing mode)
- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCData
public int writeCData(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeCDatain classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCDataContents
protected int writeCDataContents(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCharacters
public final void writeCharacters(java.lang.String text) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeCharactersin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
longWriteCharacters
private final void longWriteCharacters(java.lang.String text) throws java.io.IOException, javax.xml.stream.XMLStreamException- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCharacters
public final void writeCharacters(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeCharactersin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeSplitCharacters
private final void writeSplitCharacters(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionThis method is called when it is possible that the output may cross the output buffer boundary. Because of this, code has to add more boundary checks.- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeTypedValue
public void writeTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeTypedValuein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeAttribute
public final void writeAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeAttributein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeComment
public int writeComment(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionMethod that will try to output the content as specified. If the content passed in has embedded "--" in it, it will either add an intervening space between consequtive hyphens (if content fixing is enabled), or return the offset of the first hyphen in multi-hyphen sequence.- Specified by:
writeCommentin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCommentContents
protected int writeCommentContents(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionNote: the only way to fix comment contents is to inject a space to split up consecutive '--' (or '-' that ends a comment).- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeDTD
public void writeDTD(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamExceptionDescription copied from class:XmlWriterOlder "legacy" output method for outputting DOCTYPE declaration. Assumes that the passed-in String contains a complete DOCTYPE declaration properly quoted.
-
writeDTD
public void writeDTD(WName rootName, java.lang.String systemId, java.lang.String publicId, java.lang.String internalSubset) throws java.io.IOException, javax.xml.stream.XMLStreamException
-
writePIData
protected int writePIData(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeEntityReference
public void writeEntityReference(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeEntityReferencein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writePI
public int writePI(WName target, java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException
-
writeSpace
public final void writeSpace(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeSpacein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeSpace
public void writeSpace(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeSpacein classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeXmlDeclaration
public void writeXmlDeclaration(java.lang.String version, java.lang.String encoding, java.lang.String standalone) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writeXmlDeclarationin classXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeCDataStart
protected final void writeCDataStart() throws java.io.IOException- Throws:
java.io.IOException
-
writeCDataEnd
protected final void writeCDataEnd() throws java.io.IOException- Throws:
java.io.IOException
-
writeCommentStart
protected final void writeCommentStart() throws java.io.IOException- Throws:
java.io.IOException
-
writeCommentEnd
protected final void writeCommentEnd() throws java.io.IOException- Throws:
java.io.IOException
-
writeRaw
protected final void writeRaw(byte b) throws java.io.IOException- Throws:
java.io.IOException
-
writeRaw
protected final void writeRaw(byte b1, byte b2) throws java.io.IOException- Throws:
java.io.IOException
-
writeRaw
protected final void writeRaw(byte[] buf) throws java.io.IOException- Throws:
java.io.IOException
-
writeRaw
protected final void writeRaw(byte[] buf, int offset, int len) throws java.io.IOException- Throws:
java.io.IOException
-
throwUnpairedSurrogate
protected final void throwUnpairedSurrogate() throws java.io.IOException- Throws:
java.io.IOException
-
throwUnpairedSurrogate
protected final void throwUnpairedSurrogate(int code) throws java.io.IOException- Throws:
java.io.IOException
-
flushBuffer
protected final void flushBuffer() throws java.io.IOException- Throws:
java.io.IOException
-
writeAsEntity
protected final void writeAsEntity(int c) throws java.io.IOException- Throws:
java.io.IOException
-
calcSurrogate
protected final int calcSurrogate(int surr1, int surr2, java.lang.String context) throws javax.xml.stream.XMLStreamException- Throws:
javax.xml.stream.XMLStreamException
-
getAscii
protected static final byte[] getAscii(java.lang.String str)
-
getAscii
protected static final void getAscii(java.lang.String str, byte[] result)
-
getAscii
protected static final void getAscii(java.lang.String str, byte[] result, int offset)
-
-