Package com.ctc.wstx.sw
Class AsciiXmlWriter
- java.lang.Object
-
- com.ctc.wstx.sw.XmlWriter
-
- com.ctc.wstx.sw.EncodingXmlWriter
-
- com.ctc.wstx.sw.AsciiXmlWriter
-
public final class AsciiXmlWriter extends EncodingXmlWriter
Concrete implementation ofEncodingXmlWriterused when output is to be encoded using 7-bit ascii (US-ASCII) encoding.
-
-
Field Summary
-
Fields inherited from class com.ctc.wstx.sw.EncodingXmlWriter
BYTE_A, BYTE_AMP, BYTE_APOS, BYTE_COLON, BYTE_EQ, BYTE_G, BYTE_GT, BYTE_HASH, BYTE_HYPHEN, BYTE_L, BYTE_LBRACKET, BYTE_LT, BYTE_M, BYTE_O, BYTE_P, BYTE_Q, BYTE_QMARK, BYTE_QUOT, BYTE_RBRACKET, BYTE_S, BYTE_SEMICOLON, BYTE_SLASH, BYTE_SPACE, BYTE_T, BYTE_U, BYTE_X, DEFAULT_BUFFER_SIZE, mOutputBuffer, mOutputPtr, mSurrogate
-
Fields inherited from class com.ctc.wstx.sw.XmlWriter
DEFAULT_QUOTE_CHAR, mAddSpaceAfterEmptyElem, mAttrValueWriter, mAutoCloseOutput, mCheckContent, mCheckNames, mCheckStructure, mConfig, mEncoding, mEscapeCR, mFixContent, mLocPastChars, mLocRowNr, mLocRowStartOffset, mNsAware, mRawWrapper, mTextWrapper, mTextWriter, mUseDoubleQuotesInXmlDecl, mXml11, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST
-
-
Constructor Summary
Constructors Constructor Description AsciiXmlWriter(java.io.OutputStream out, WriterConfig cfg, boolean autoclose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidhandleInvalidAsciiChar(int c)protected voidwriteAttrValue(char[] data, int offset, int len)protected voidwriteAttrValue(java.lang.String data)protected intwriteCDataContent(char[] cbuf, int start, int len)protected intwriteCDataContent(java.lang.String data)protected intwriteCommentContent(java.lang.String data)protected intwritePIData(java.lang.String data)voidwriteRaw(char[] cbuf, int offset, int len)voidwriteRaw(java.lang.String str, int offset, int len)protected voidwriteTextContent(char[] cbuf, int offset, int len)protected voidwriteTextContent(java.lang.String data)-
Methods inherited from class com.ctc.wstx.sw.EncodingXmlWriter
calcSurrogate, close, flush, flushBuffer, getOutputPtr, getOutputStream, getWriter, throwUnpairedSurrogate, throwUnpairedSurrogate, writeAscii, writeAscii, writeAscii, writeAsEntity, writeAttribute, writeAttribute, writeAttribute, writeAttribute, writeCData, writeCData, writeCDataEnd, writeCDataStart, writeCharacters, writeCharacters, writeComment, writeCommentEnd, writeCommentStart, writeDTD, writeDTD, writeEndTag, writeEndTag, writeEntityReference, writeName, writeNameUnchecked, writePI, writePIEnd, writePIStart, writeRawAscii, writeStartTagEmptyEnd, writeStartTagEnd, writeStartTagStart, writeStartTagStart, writeTypedAttribute, writeTypedAttribute, writeTypedAttribute, writeTypedElement, writeTypedElement, writeXmlDeclaration
-
Methods inherited from class com.ctc.wstx.sw.XmlWriter
enableXml11, getAbsOffset, getColumn, getRow, handleInvalidChar, reportNwfContent, reportNwfName, throwOutputError, throwOutputError, verifyNameValidity, wrapAsRawWriter, wrapAsTextWriter, writeRaw
-
-
-
-
Constructor Detail
-
AsciiXmlWriter
public AsciiXmlWriter(java.io.OutputStream out, WriterConfig cfg, boolean autoclose) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
writeRaw
public void writeRaw(char[] cbuf, int offset, int len) throws java.io.IOException- Specified by:
writeRawin classEncodingXmlWriter- Throws:
java.io.IOException
-
writeRaw
public void writeRaw(java.lang.String str, int offset, int len) throws java.io.IOException- Specified by:
writeRawin classEncodingXmlWriter- Throws:
java.io.IOException
-
writeAttrValue
protected void writeAttrValue(java.lang.String data) throws java.io.IOException- Specified by:
writeAttrValuein classEncodingXmlWriter- Throws:
java.io.IOException
-
writeAttrValue
protected void writeAttrValue(char[] data, int offset, int len) throws java.io.IOException- Specified by:
writeAttrValuein classEncodingXmlWriter- Throws:
java.io.IOException
-
writeCDataContent
protected int writeCDataContent(java.lang.String data) throws java.io.IOException- Specified by:
writeCDataContentin classEncodingXmlWriter- Throws:
java.io.IOException
-
writeCDataContent
protected int writeCDataContent(char[] cbuf, int start, int len) throws java.io.IOException- Specified by:
writeCDataContentin classEncodingXmlWriter- Throws:
java.io.IOException
-
writeCommentContent
protected int writeCommentContent(java.lang.String data) throws java.io.IOException- Specified by:
writeCommentContentin classEncodingXmlWriter- Throws:
java.io.IOException
-
writePIData
protected int writePIData(java.lang.String data) throws java.io.IOException, javax.xml.stream.XMLStreamException- Specified by:
writePIDatain classEncodingXmlWriter- Throws:
java.io.IOExceptionjavax.xml.stream.XMLStreamException
-
writeTextContent
protected void writeTextContent(java.lang.String data) throws java.io.IOException- Specified by:
writeTextContentin classEncodingXmlWriter- Throws:
java.io.IOException
-
writeTextContent
protected void writeTextContent(char[] cbuf, int offset, int len) throws java.io.IOException- Specified by:
writeTextContentin classEncodingXmlWriter- Throws:
java.io.IOException
-
handleInvalidAsciiChar
protected void handleInvalidAsciiChar(int c) throws java.io.IOException- Throws:
java.io.IOException
-
-