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
_charTypes
Validation tables used for verifying validity (and need for quoting)protected java.io.OutputStream
_out
Actual Writer to use for outputting buffered data as appropriate.protected byte[]
_outputBuffer
protected int
_outputBufferLen
protected int
_outputPtr
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.(package private) static byte
BYTE_A
(package private) static byte
BYTE_AMP
(package private) static byte
BYTE_APOS
(package private) static byte
BYTE_COLON
(package private) static byte
BYTE_EQ
(package private) static byte
BYTE_G
(package private) static byte
BYTE_GT
(package private) static byte
BYTE_HASH
(package private) static byte
BYTE_HYPHEN
(package private) static byte
BYTE_L
(package private) static byte
BYTE_LBRACKET
(package private) static byte
BYTE_LT
(package private) static byte
BYTE_M
(package private) static byte
BYTE_O
(package private) static byte
BYTE_P
(package private) static byte
BYTE_Q
(package private) static byte
BYTE_QMARK
(package private) static byte
BYTE_QUOT
(package private) static byte
BYTE_RBRACKET
(package private) static byte
BYTE_S
(package private) static byte
BYTE_SEMICOLON
(package private) static byte
BYTE_SLASH
(package private) static byte
BYTE_SPACE
(package private) static byte
BYTE_T
(package private) static byte
BYTE_U
(package private) static byte
BYTE_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 int
DEFAULT_COPY_BUFFER_SIZE
Default intermediate copy buffer size, to be used for efficient access to String content.(package private) static int
DEFAULT_FULL_BUFFER_SIZE
And this value determines size of the intermediate copy buffer to use.(package private) static int
SMALL_WRITE
Let'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 protected
ByteXmlWriter(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 int
calcSurrogate(int surr1, int surr2, java.lang.String context)
WName
constructName(java.lang.String localName)
WName
constructName(java.lang.String prefix, java.lang.String localName)
protected abstract WName
doConstructName(java.lang.String localName)
protected abstract WName
doConstructName(java.lang.String prefix, java.lang.String localName)
protected int
fastWriteAttrValue(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 checksvoid
flush()
protected void
flushBuffer()
protected static byte[]
getAscii(java.lang.String str)
protected static void
getAscii(java.lang.String str, byte[] result)
protected static void
getAscii(java.lang.String str, byte[] result, int offset)
protected int
getOutputPtr()
private void
longWriteCharacters(java.lang.String text)
protected abstract void
output2ByteChar(int ch)
protected abstract int
outputMultiByteChar(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 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 entitiesprotected abstract void
outputSurrogates(int surr1, int surr2)
Method called to output a composite character, result of combining 2 surrogate characters.protected void
throwUnpairedSurrogate()
protected void
throwUnpairedSurrogate(int code)
protected void
verifyNameComponent(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 void
writeAsEntity(int c)
void
writeAttribute(WName name, char[] vbuf, int offset, int vlen)
void
writeAttribute(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)void
writeAttribute(WName name, org.codehaus.stax2.ri.typed.AsciiValueEncoder enc)
private void
writeAttrNameEqQ(WName name)
protected void
writeAttrValue(char[] vbuf, int offset, int len)
int
writeCData(char[] cbuf, int offset, int len)
int
writeCData(java.lang.String data)
protected int
writeCDataContents(char[] cbuf, int offset, int len)
protected void
writeCDataEnd()
protected void
writeCDataStart()
void
writeCharacters(char[] cbuf, int offset, int len)
void
writeCharacters(java.lang.String text)
int
writeComment(java.lang.String data)
Method that will try to output the content as specified.protected int
writeCommentContents(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 void
writeCommentEnd()
protected void
writeCommentStart()
void
writeDTD(WName rootName, java.lang.String systemId, java.lang.String publicId, java.lang.String internalSubset)
void
writeDTD(java.lang.String data)
Older "legacy" output method for outputting DOCTYPE declaration.void
writeEndTag(WName name)
void
writeEntityReference(WName name)
protected void
writeLongAttribute(WName name, java.lang.String value, int vlen)
protected void
writeName(byte preChar, WName name)
protected void
writeName(WName name)
protected void
writeName(WName name, byte postChar)
int
writePI(WName target, java.lang.String data)
protected int
writePIData(char[] cbuf, int offset, int len)
protected void
writeRaw(byte b)
protected void
writeRaw(byte[] buf)
protected void
writeRaw(byte[] buf, int offset, int len)
protected void
writeRaw(byte b1, byte b2)
abstract void
writeRaw(char[] cbuf, int offset, int len)
This method is heavily encoding-dependant, so it needs to be deferred to sub-classesvoid
writeRaw(java.lang.String text, int offset, int len)
void
writeSpace(char[] cbuf, int offset, int len)
void
writeSpace(java.lang.String data)
private void
writeSplitCharacters(char[] cbuf, int offset, int len)
This method is called when it is possible that the output may cross the output buffer boundary.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(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:
getOutputPtr
in classXmlWriter
-
constructName
public final WName constructName(java.lang.String localName) throws javax.xml.stream.XMLStreamException
- Specified by:
constructName
in 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:
constructName
in 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.XMLStreamException
Method 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.XMLStreamException
Method called to output a composite character, result of combining 2 surrogate characters.- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
output2ByteChar
protected abstract void output2ByteChar(int ch) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
outputStrictMultiByteChar
protected abstract int outputStrictMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws java.io.IOException, javax.xml.stream.XMLStreamException
Method 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.IOException
javax.xml.stream.XMLStreamException
-
outputMultiByteChar
protected abstract int outputMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws java.io.IOException, javax.xml.stream.XMLStreamException
Method 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.IOException
javax.xml.stream.XMLStreamException
-
_releaseBuffers
public void _releaseBuffers()
- Overrides:
_releaseBuffers
in classXmlWriter
-
_closeTarget
public void _closeTarget(boolean doClose) throws java.io.IOException
- Specified by:
_closeTarget
in 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.XMLStreamException
This 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: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)
- Specified by:
writeStartTagStart
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeStartTagEnd
public final void writeStartTagEnd() throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeStartTagEnd
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeStartTagEmptyEnd
public void writeStartTagEmptyEnd() throws java.io.IOException
- Specified by:
writeStartTagEmptyEnd
in classXmlWriter
- Throws:
java.io.IOException
-
writeEndTag
public final void writeEndTag(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeEndTag
in classXmlWriter
- Throws:
java.io.IOException
javax.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: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)
- Specified by:
writeAttribute
in classXmlWriter
- Throws:
java.io.IOException
javax.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:
writeAttribute
in classXmlWriter
- Throws:
java.io.IOException
javax.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.XMLStreamException
Method 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.IOException
javax.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.IOException
javax.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.IOException
javax.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.IOException
javax.xml.stream.XMLStreamException
-
writeCData
public int writeCData(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeCData
in 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.IOException
javax.xml.stream.XMLStreamException
-
writeCData
public int writeCData(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeCData
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeCDataContents
protected int writeCDataContents(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeCharacters
public final void writeCharacters(java.lang.String text) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeCharacters
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
longWriteCharacters
private final void longWriteCharacters(java.lang.String text) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeCharacters
public final void writeCharacters(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeCharacters
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeSplitCharacters
private final void writeSplitCharacters(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
This 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.IOException
javax.xml.stream.XMLStreamException
-
writeTypedValue
public void writeTypedValue(org.codehaus.stax2.ri.typed.AsciiValueEncoder enc) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeTypedValue
in classXmlWriter
- Throws:
java.io.IOException
javax.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:
writeAttribute
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeComment
public int writeComment(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException
Method 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:
writeComment
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeCommentContents
protected int writeCommentContents(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
Note: the only way to fix comment contents is to inject a space to split up consecutive '--' (or '-' that ends a comment).- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeDTD
public void writeDTD(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException
Description copied from class:XmlWriter
Older "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.IOException
javax.xml.stream.XMLStreamException
-
writeEntityReference
public void writeEntityReference(WName name) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeEntityReference
in classXmlWriter
- Throws:
java.io.IOException
javax.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:
writeSpace
in classXmlWriter
- Throws:
java.io.IOException
javax.xml.stream.XMLStreamException
-
writeSpace
public void writeSpace(char[] cbuf, int offset, int len) throws java.io.IOException, javax.xml.stream.XMLStreamException
- Specified by:
writeSpace
in classXmlWriter
- Throws:
java.io.IOException
javax.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:
writeXmlDeclaration
in classXmlWriter
- Throws:
java.io.IOException
javax.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)
-
-