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 ofEncodingXmlWriter
used when output is to be encoded using 7-bit ascii (US-ASCII) encoding.
-
-
Field Summary
-
Fields inherited from class com.ctc.wstx.sw.EncodingXmlWriter
mOutputBuffer, mOutputPtr, mSurrogate
-
Fields inherited from class com.ctc.wstx.sw.XmlWriter
DEFAULT_QUOTE_CHAR, mAttrValueWriter, mAutoCloseOutput, mCheckContent, mCheckNames, mCheckStructure, mConfig, mEncoding, mFixContent, mLocPastChars, mLocRowNr, mLocRowStartOffset, mNsAware, mRawWrapper, mTextWrapper, mTextWriter, mXml11, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST
-
-
Constructor Summary
Constructors Constructor Description AsciiXmlWriter(OutputStream out, WriterConfig cfg, boolean autoclose)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
handleInvalidAsciiChar(int c)
protected void
writeAttrValue(char[] data, int offset, int len)
protected void
writeAttrValue(String data)
protected int
writeCDataContent(char[] cbuf, int start, int len)
protected int
writeCDataContent(String data)
protected int
writeCommentContent(String data)
protected int
writePIData(String data)
void
writeRaw(char[] cbuf, int offset, int len)
void
writeRaw(String str, int offset, int len)
protected void
writeTextContent(char[] cbuf, int offset, int len)
protected void
writeTextContent(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(OutputStream out, WriterConfig cfg, boolean autoclose) throws IOException
- Throws:
IOException
-
-
Method Detail
-
writeRaw
public void writeRaw(char[] cbuf, int offset, int len) throws IOException
- Specified by:
writeRaw
in classEncodingXmlWriter
- Throws:
IOException
-
writeRaw
public void writeRaw(String str, int offset, int len) throws IOException
- Specified by:
writeRaw
in classEncodingXmlWriter
- Throws:
IOException
-
writeAttrValue
protected void writeAttrValue(String data) throws IOException
- Specified by:
writeAttrValue
in classEncodingXmlWriter
- Throws:
IOException
-
writeAttrValue
protected void writeAttrValue(char[] data, int offset, int len) throws IOException
- Specified by:
writeAttrValue
in classEncodingXmlWriter
- Throws:
IOException
-
writeCDataContent
protected int writeCDataContent(String data) throws IOException
- Specified by:
writeCDataContent
in classEncodingXmlWriter
- Throws:
IOException
-
writeCDataContent
protected int writeCDataContent(char[] cbuf, int start, int len) throws IOException
- Specified by:
writeCDataContent
in classEncodingXmlWriter
- Throws:
IOException
-
writeCommentContent
protected int writeCommentContent(String data) throws IOException
- Specified by:
writeCommentContent
in classEncodingXmlWriter
- Throws:
IOException
-
writePIData
protected int writePIData(String data) throws IOException, XMLStreamException
- Specified by:
writePIData
in classEncodingXmlWriter
- Throws:
IOException
XMLStreamException
-
writeTextContent
protected void writeTextContent(String data) throws IOException
- Specified by:
writeTextContent
in classEncodingXmlWriter
- Throws:
IOException
-
writeTextContent
protected void writeTextContent(char[] cbuf, int offset, int len) throws IOException
- Specified by:
writeTextContent
in classEncodingXmlWriter
- Throws:
IOException
-
handleInvalidAsciiChar
protected void handleInvalidAsciiChar(int c) throws IOException
- Throws:
IOException
-
-