|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.aalto.out.WNameFactory
com.fasterxml.aalto.out.XmlWriter
com.fasterxml.aalto.out.ByteXmlWriter
com.fasterxml.aalto.out.SingleByteXmlWriter
public abstract class SingleByteXmlWriter
This is the common base class for writers that output to byte-backed output sources, and use Ascii or ISO-8859-1 (Latin1) encoding.
Field Summary |
---|
Fields inherited from class com.fasterxml.aalto.out.ByteXmlWriter |
---|
_out, _outputBuffer, _outputBufferLen, _outputPtr, mCharTypes, mCopyBuffer, mCopyBufferLen, mSurrogate |
Fields inherited from class com.fasterxml.aalto.out.XmlWriter |
---|
ATTR_MIN_ARRAYCOPY, DEFAULT_COPYBUFFER_LEN, mCfgNsAware, mCheckContent, mCheckNames, MIN_ARRAYCOPY, mLocPastChars, mLocRowNr, mLocRowStartOffset, mXml11, SURR1_FIRST, SURR1_LAST, SURR2_FIRST, SURR2_LAST |
Constructor Summary | |
---|---|
SingleByteXmlWriter(WriterConfig cfg,
OutputStream out,
XmlCharTypes charTypes)
|
Method Summary | |
---|---|
abstract int |
getHighestEncodable()
Method called by error reporting code, to figure out if a given character is encodable (without using character entities) with the current encoding or not. |
protected void |
output2ByteChar(int ch)
|
protected int |
outputMultiByteChar(int ch,
char[] cbuf,
int inputOffset,
int inputLen)
This can be done, although only by using character entities. |
protected int |
outputStrictMultiByteChar(int ch,
char[] cbuf,
int inputOffset,
int inputLen)
With single byte encodings, there's no way to express these characters without character entities. |
protected void |
outputSurrogates(int surr1,
int surr2)
Method called to output a composite character, result of combining 2 surrogate characters. |
abstract void |
writeRaw(char[] cbuf,
int offset,
int len)
This method is heavily encoding-dependant, so it needs to be deferred to sub-classes |
Methods inherited from class com.fasterxml.aalto.out.XmlWriter |
---|
close, enableXml11, getAbsOffset, getColumn, getRow, guessEncodingBitSize, reportFailedEscaping, reportInvalidChar, reportInvalidEmptyName, reportNwfContent, reportNwfContent, reportNwfName, reportNwfName, throwOutputError, throwOutputError |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SingleByteXmlWriter(WriterConfig cfg, OutputStream out, XmlCharTypes charTypes)
Method Detail |
---|
public abstract int getHighestEncodable()
XmlWriter
getHighestEncodable
in class XmlWriter
public abstract void writeRaw(char[] cbuf, int offset, int len) throws IOException, XMLStreamException
ByteXmlWriter
writeRaw
in class ByteXmlWriter
IOException
XMLStreamException
protected final void output2ByteChar(int ch) throws IOException, XMLStreamException
output2ByteChar
in class ByteXmlWriter
IOException
XMLStreamException
protected final int outputStrictMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws IOException, XMLStreamException
outputStrictMultiByteChar
in class ByteXmlWriter
IOException
XMLStreamException
protected final int outputMultiByteChar(int ch, char[] cbuf, int inputOffset, int inputLen) throws IOException, XMLStreamException
outputMultiByteChar
in class ByteXmlWriter
IOException
XMLStreamException
protected final void outputSurrogates(int surr1, int surr2) throws IOException, XMLStreamException
ByteXmlWriter
outputSurrogates
in class ByteXmlWriter
IOException
XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |