Top Description Fields Constructors Methods
com.ctc.wstx.sw

public abstract Class EncodingXmlWriter

extends XmlWriter
Class Inheritance
Known Direct Subclasses
com.ctc.wstx.sw.ISOLatin1XmlWriter, com.ctc.wstx.sw.AsciiXmlWriter
Imports
java.io.IOException, .OutputStream, .Writer, javax.xml.stream.XMLStreamException, org.codehaus.stax2.ri.typed.AsciiValueEncoder, org.codehaus.stax2.validation.XMLValidator, com.ctc.wstx.api.WriterConfig, com.ctc.wstx.cfg.XmlConsts

Intermediate base class used when outputting to streams that use an encoding that is compatible with 7-bit single-byte Ascii encoding. That means it can be used for UTF-8, ISO-Latin1 and pure Ascii.

Implementation Notes

Parts of surrogate handling are implemented here in the base class: storage for the first part of a split surrogate (only possible when character content is output split in multiple calls) is within base class. Also, simple checks for unmatched surrogate pairs are in writeAscii method, since it is the most convenient place to catch cases where a text segment ends with an unmatched surrogate pair half.

Field Summary

Modifier and TypeField and Description
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final byte
pack-priv static final int
DEFAULT_BUFFER_SIZE

Let's use a typical default to have a compromise between large enough chunks to output, and minimizing memory overhead.

private final OutputStream
mOut

Actual output stream to use for outputting encoded content as bytes.

protected byte[]
protected int
protected int
mSurrogate

In case a split surrogate pair is output (which can only successfully occur with either writeRaw or writeCharacters), the first part is temporarily stored within this member variable.

Inherited from com.ctc.wstx.sw.XmlWriter:
DEFAULT_QUOTE_CHARmAddSpaceAfterEmptyElemmAttrValueWritermAutoCloseOutputmCheckContentmCheckNamesmCheckStructuremConfigmEncodingmEscapeCRmFixContentmLocPastCharsmLocRowNrmLocRowStartOffsetmNsAwaremRawWrappermTextWrappermTextWritermUseDoubleQuotesInXmlDeclmXml11SURR1_FIRSTSURR1_LASTSURR2_FIRSTSURR2_LAST

Constructor Summary

AccessConstructor and Description
public
EncodingXmlWriter(OutputStream out, WriterConfig cfg, String encoding, boolean autoclose)

Method Summary

Modifier and TypeMethod and Description
protected final int
calcSurrogate(int secondSurr)

public void
close(boolean forceRealClose)

Implements abstract com.ctc.wstx.sw.XmlWriter.close.

Method called to flush the buffer(s), and close the output sink (stream or writer) if enabled (auto-closing) or forced.

public final void
flush()

Implements abstract com.ctc.wstx.sw.XmlWriter.flush.

protected final void
protected int
getOutputPtr()

Implements abstract com.ctc.wstx.sw.XmlWriter.getOutputPtr.

This method is needed by the super class, to calculate hard byte/char offsets.

protected final OutputStream
protected final Writer
protected final void
protected final void
protected final void
writeAscii(byte b)

protected final void
writeAscii(byte b1, byte b2)

protected final void
protected final int

Returns:

New value of mOutputPtr
writeAsEntity
(int c)

Entity writing can be optimized quite nicely, since it only needs to output ascii characters.

public void
writeAttribute(String localName, String value)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

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)

public void
writeAttribute(String localName, char[] value, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

public void
writeAttribute(String prefix, String localName, String value)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

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)

public void
writeAttribute(String prefix, String localName, char[] value, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

protected abstract void
protected abstract void
writeAttrValue(char[] value, int offset, int len)

public int
writeCData(String
Contents of the CDATA section to write out
data
)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCData.

public int
writeCData(char[] cbuf, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCData.

protected abstract int
protected abstract int
writeCDataContent(char[] cbuf, int start, int len)

public final void
public final void
public final void
public final void
writeCharacters(char[] cbuf, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCharacters.

public int
writeComment(String data)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeComment.

Method that will try to output the content as specified.

protected abstract int
public final void
public final void
public void
writeDTD(String data)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeDTD.

Older "legacy" output method for outputting DOCTYPE declaration.

public void
writeDTD(String rootName, String systemId, String publicId, String internalSubset)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeDTD.

public void
public void
writeEndTag(String prefix, String localName)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeEndTag.

public void
protected final void
protected final void
public int
writePI(String target, String data)

Implements abstract com.ctc.wstx.sw.XmlWriter.writePI.

protected abstract int
public final void
public final void
writePIStart(String target, boolean addSpace)

Implements abstract com.ctc.wstx.sw.XmlWriter.writePIStart.

public abstract void
writeRaw(char[] cbuf, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRaw.

public abstract void
writeRaw(String str, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRaw.

public final void
writeRawAscii(char[] buf, int offset, int len)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRawAscii.

Like writeRaw, but caller guarantees that the contents additionally are known to be in 7-bit ascii range.

public void
public void
public void
writeStartTagStart(String localName)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

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)

public void
writeStartTagStart(String prefix, String localName)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

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)

protected abstract void
protected abstract void
writeTextContent(char[] cbuf, int start, int len)

public void
writeTypedAttribute(String localName, AsciiValueEncoder enc)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping.

public void
writeTypedAttribute(String prefix, String localName, AsciiValueEncoder enc)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping.

public void
writeTypedAttribute(String prefix, String localName, String nsURI, AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping.

public final void
writeTypedElement(AsciiValueEncoder
Encoder that will produce content
enc
)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Non-validating version of typed write method

public final void
writeTypedElement(AsciiValueEncoder
Encoder that will produce content
enc
,
XMLValidator
Validator to use for validating serialized textual content (can not be null)
validator
,
char[]
Temporary buffer that writer can use for temporary copies as necessary
copyBuffer
)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Validating version of typed write method

public void
writeXmlDeclaration(String version, String encoding, String standalone)

Implements abstract com.ctc.wstx.sw.XmlWriter.writeXmlDeclaration.

Inherited from com.ctc.wstx.sw.XmlWriter:
enableXml11getAbsOffsetgetColumngetRowhandleInvalidCharreportNwfContentreportNwfNamethrowOutputErrorthrowOutputErrorverifyNameValiditywrapAsRawWriterwrapAsTextWriterwriteRaw

Field Detail

BYTE_Aback to summary
pack-priv static final byte BYTE_A
BYTE_AMPback to summary
pack-priv static final byte BYTE_AMP
BYTE_APOSback to summary
pack-priv static final byte BYTE_APOS
BYTE_COLONback to summary
pack-priv static final byte BYTE_COLON
BYTE_EQback to summary
pack-priv static final byte BYTE_EQ
BYTE_Gback to summary
pack-priv static final byte BYTE_G
BYTE_GTback to summary
pack-priv static final byte BYTE_GT
BYTE_HASHback to summary
pack-priv static final byte BYTE_HASH
BYTE_HYPHENback to summary
pack-priv static final byte BYTE_HYPHEN
BYTE_Lback to summary
pack-priv static final byte BYTE_L
BYTE_LBRACKETback to summary
pack-priv static final byte BYTE_LBRACKET
BYTE_LTback to summary
pack-priv static final byte BYTE_LT
BYTE_Mback to summary
pack-priv static final byte BYTE_M
BYTE_Oback to summary
pack-priv static final byte BYTE_O
BYTE_Pback to summary
pack-priv static final byte BYTE_P
BYTE_Qback to summary
pack-priv static final byte BYTE_Q
BYTE_QMARKback to summary
pack-priv static final byte BYTE_QMARK
BYTE_QUOTback to summary
pack-priv static final byte BYTE_QUOT
BYTE_RBRACKETback to summary
pack-priv static final byte BYTE_RBRACKET
BYTE_Sback to summary
pack-priv static final byte BYTE_S
BYTE_SEMICOLONback to summary
pack-priv static final byte BYTE_SEMICOLON
BYTE_SLASHback to summary
pack-priv static final byte BYTE_SLASH
BYTE_SPACEback to summary
pack-priv static final byte BYTE_SPACE
BYTE_Tback to summary
pack-priv static final byte BYTE_T
BYTE_Uback to summary
pack-priv static final byte BYTE_U
BYTE_Xback to summary
pack-priv static final byte BYTE_X
DEFAULT_BUFFER_SIZEback to summary
pack-priv static final int DEFAULT_BUFFER_SIZE

Let's use a typical default to have a compromise between large enough chunks to output, and minimizing memory overhead. 4k should be close enough to a physical page to work out acceptably, without causing excessive (if temporary) memory usage.

mOutback to summary
private final OutputStream mOut

Actual output stream to use for outputting encoded content as bytes.

mOutputBufferback to summary
protected byte[] mOutputBuffer
mOutputPtrback to summary
protected int mOutputPtr
mSurrogateback to summary
protected int mSurrogate

In case a split surrogate pair is output (which can only successfully occur with either writeRaw or writeCharacters), the first part is temporarily stored within this member variable.

Constructor Detail

EncodingXmlWriterback to summary
public EncodingXmlWriter(OutputStream out, WriterConfig cfg, String encoding, boolean autoclose) throws IOException

Method Detail

calcSurrogateback to summary
protected final int calcSurrogate(int secondSurr) throws IOException
closeback to summary
public void close(boolean forceRealClose) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.close.

Doc from com.ctc.wstx.sw.XmlWriter.close.

Method called to flush the buffer(s), and close the output sink (stream or writer) if enabled (auto-closing) or forced.

Annotations
@Override
flushback to summary
public final void flush() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.flush.

Annotations
@Override
flushBufferback to summary
protected final void flushBuffer() throws IOException
getOutputPtrback to summary
protected int getOutputPtr()

Implements abstract com.ctc.wstx.sw.XmlWriter.getOutputPtr.

This method is needed by the super class, to calculate hard byte/char offsets.

Annotations
@Override
getOutputStreamback to summary
protected final OutputStream getOutputStream()

Implements abstract com.ctc.wstx.sw.XmlWriter.getOutputStream.

Returns:OutputStream

Doc from com.ctc.wstx.sw.XmlWriter.getOutputStream.

Underlying OutputStream used for physical output, if the writer was constructed using one

Annotations
@Override
getWriterback to summary
protected final Writer getWriter()

Implements abstract com.ctc.wstx.sw.XmlWriter.getWriter.

Returns:Writer

Doc from com.ctc.wstx.sw.XmlWriter.getWriter.

Underlying Writer used for physical output, if the writer was constructed with one, or one was created to be used with an OutputStream.

Annotations
@Override
throwUnpairedSurrogateback to summary
protected final void throwUnpairedSurrogate() throws IOException
throwUnpairedSurrogateback to summary
protected final void throwUnpairedSurrogate(int code) throws IOException
writeAsciiback to summary
protected final void writeAscii(byte b) throws IOException
writeAsciiback to summary
protected final void writeAscii(byte b1, byte b2) throws IOException
writeAsciiback to summary
protected final void writeAscii(String str) throws IOException
writeAsEntityback to summary
protected final int writeAsEntity(int c) throws IOException

Entity writing can be optimized quite nicely, since it only needs to output ascii characters.

Returns:int

New value of mOutputPtr

writeAttributeback to summary
public void writeAttribute(String localName, String value) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

Doc from com.ctc.wstx.sw.XmlWriter.writeAttribute.

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)

Annotations
@Override
writeAttributeback to summary
public void writeAttribute(String localName, char[] value, int offset, int len) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

Annotations
@Override
writeAttributeback to summary
public void writeAttribute(String prefix, String localName, String value) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

Doc from com.ctc.wstx.sw.XmlWriter.writeAttribute.

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)

Annotations
@Override
writeAttributeback to summary
public void writeAttribute(String prefix, String localName, char[] value, int offset, int len) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeAttribute.

Annotations
@Override
writeAttrValueback to summary
protected abstract void writeAttrValue(String data) throws IOException
writeAttrValueback to summary
protected abstract void writeAttrValue(char[] value, int offset, int len) throws IOException
writeCDataback to summary
public int writeCData(String data) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCData.

Parameters
data:String

Doc from com.ctc.wstx.sw.XmlWriter.writeCData.

Contents of the CDATA section to write out

Returns:int

Doc from com.ctc.wstx.sw.XmlWriter.writeCData.

offset of the (first) illegal content segment ("]]>") in passed content and not in repairing mode; or -1 if none or is repairing

Annotations
@Override
writeCDataback to summary
public int writeCData(char[] cbuf, int offset, int len) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCData.

Annotations
@Override
writeCDataContentback to summary
protected abstract int writeCDataContent(String data) throws IOException
writeCDataContentback to summary
protected abstract int writeCDataContent(char[] cbuf, int start, int len) throws IOException
writeCDataEndback to summary
public final void writeCDataEnd() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCDataEnd.

Annotations
@Override
writeCDataStartback to summary
public final void writeCDataStart() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCDataStart.

Annotations
@Override
writeCharactersback to summary
public final void writeCharacters(String data) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCharacters.

Annotations
@Override
writeCharactersback to summary
public final void writeCharacters(char[] cbuf, int offset, int len) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCharacters.

Annotations
@Override
writeCommentback to summary
public int writeComment(String data) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeComment.

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.

Annotations
@Override
writeCommentContentback to summary
protected abstract int writeCommentContent(String data) throws IOException
writeCommentEndback to summary
public final void writeCommentEnd() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCommentEnd.

Annotations
@Override
writeCommentStartback to summary
public final void writeCommentStart() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeCommentStart.

Annotations
@Override
writeDTDback to summary
public void writeDTD(String data) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeDTD.

Doc from com.ctc.wstx.sw.XmlWriter.writeDTD.

Older "legacy" output method for outputting DOCTYPE declaration. Assumes that the passed-in String contains a complete DOCTYPE declaration properly quoted.

Annotations
@Override
writeDTDback to summary
public void writeDTD(String rootName, String systemId, String publicId, String internalSubset) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeDTD.

Annotations
@Override
writeEndTagback to summary
public void writeEndTag(String localName) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeEndTag.

Annotations
@Override
writeEndTagback to summary
public void writeEndTag(String prefix, String localName) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeEndTag.

Annotations
@Override
writeEntityReferenceback to summary
public void writeEntityReference(String name) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeEntityReference.

Annotations
@Override
writeNameback to summary
protected final void writeName(String name) throws IOException, XMLStreamException
writeNameUncheckedback to summary
protected final void writeNameUnchecked(String name) throws IOException
writePIback to summary
public int writePI(String target, String data) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writePI.

Annotations
@Override
writePIDataback to summary
protected abstract int writePIData(String data) throws IOException, XMLStreamException
writePIEndback to summary
public final void writePIEnd() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writePIEnd.

Annotations
@Override
writePIStartback to summary
public final void writePIStart(String target, boolean addSpace) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writePIStart.

Annotations
@Override
writeRawback to summary
public abstract void writeRaw(char[] cbuf, int offset, int len) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRaw.

Annotations
@Override
writeRawback to summary
public abstract void writeRaw(String str, int offset, int len) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRaw.

Annotations
@Override
writeRawAsciiback to summary
public final void writeRawAscii(char[] buf, int offset, int len) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeRawAscii.

Doc from com.ctc.wstx.sw.XmlWriter.writeRawAscii.

Like writeRaw, but caller guarantees that the contents additionally are known to be in 7-bit ascii range.

Annotations
@Override
writeStartTagEmptyEndback to summary
public void writeStartTagEmptyEnd() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagEmptyEnd.

Annotations
@Override
writeStartTagEndback to summary
public void writeStartTagEnd() throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagEnd.

Annotations
@Override
writeStartTagStartback to summary
public void writeStartTagStart(String localName) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

Doc from com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

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)

Annotations
@Override
writeStartTagStartback to summary
public void writeStartTagStart(String prefix, String localName) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

Doc from com.ctc.wstx.sw.XmlWriter.writeStartTagStart.

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)

Annotations
@Override
writeTextContentback to summary
protected abstract void writeTextContent(String data) throws IOException
writeTextContentback to summary
protected abstract void writeTextContent(char[] cbuf, int start, int len) throws IOException
writeTypedAttributeback to summary
public void writeTypedAttribute(String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping. No validation needs to be performed.

Annotations
@Override
writeTypedAttributeback to summary
public void writeTypedAttribute(String prefix, String localName, AsciiValueEncoder enc) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping. No validation needs to be performed.

Annotations
@Override
writeTypedAttributeback to summary
public void writeTypedAttribute(String prefix, String localName, String nsURI, AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedAttribute.

Method similar to writeAttribute(String, String, char[], int, int) but where is known not to require escaping. Validation of the attribute value must be done by calling given validator appropriately.

Annotations
@Override
writeTypedElementback to summary
public final void writeTypedElement(AsciiValueEncoder enc) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Non-validating version of typed write method

Parameters
enc:AsciiValueEncoder

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Encoder that will produce content

Annotations
@Override
writeTypedElementback to summary
public final void writeTypedElement(AsciiValueEncoder enc, XMLValidator validator, char[] copyBuffer) throws IOException, XMLStreamException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Validating version of typed write method

Parameters
enc:AsciiValueEncoder

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Encoder that will produce content

validator:XMLValidator

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Validator to use for validating serialized textual content (can not be null)

copyBuffer:char[]

Doc from com.ctc.wstx.sw.XmlWriter.writeTypedElement.

Temporary buffer that writer can use for temporary copies as necessary

Annotations
@Override
writeXmlDeclarationback to summary
public void writeXmlDeclaration(String version, String encoding, String standalone) throws IOException

Implements abstract com.ctc.wstx.sw.XmlWriter.writeXmlDeclaration.

Annotations
@Override