com.fasterxml.aalto.out
Class AsciiXmlWriter

java.lang.Object
  extended by com.fasterxml.aalto.out.WNameFactory
      extended by com.fasterxml.aalto.out.XmlWriter
          extended by com.fasterxml.aalto.out.ByteXmlWriter
              extended by com.fasterxml.aalto.out.SingleByteXmlWriter
                  extended by com.fasterxml.aalto.out.AsciiXmlWriter

public final class AsciiXmlWriter
extends SingleByteXmlWriter

This is the generic implementation of XmlWriter, used if the destination is byte-based OutputStream, and encoding is 7-bit (US) Ascii.


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
AsciiXmlWriter(WriterConfig cfg, OutputStream out)
           
 
Method Summary
protected  WName doConstructName(String localName)
           
protected  WName doConstructName(String prefix, String localName)
           
 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.
 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.SingleByteXmlWriter
output2ByteChar, outputMultiByteChar, outputStrictMultiByteChar, outputSurrogates
 
Methods inherited from class com.fasterxml.aalto.out.ByteXmlWriter
_closeTarget, _releaseBuffers, calcSurrogate, constructName, constructName, fastWriteAttrValue, flush, flushBuffer, getAscii, getAscii, getAscii, getOutputPtr, throwUnpairedSurrogate, throwUnpairedSurrogate, verifyNameComponent, writeAsEntity, writeAttribute, writeAttribute, writeAttribute, writeAttrValue, writeCData, writeCData, writeCDataContents, writeCDataEnd, writeCDataStart, writeCharacters, writeCharacters, writeComment, writeCommentContents, writeCommentEnd, writeCommentStart, writeDTD, writeDTD, writeEndTag, writeEntityReference, writeLongAttribute, writeName, writeName, writeName, writePI, writePIData, writeRaw, writeRaw, writeRaw, writeRaw, writeRaw, writeSpace, writeSpace, writeStartTagEmptyEnd, writeStartTagEnd, writeStartTagStart, writeTypedValue, writeXmlDeclaration
 
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

AsciiXmlWriter

public AsciiXmlWriter(WriterConfig cfg,
                      OutputStream out)
Method Detail

getHighestEncodable

public int getHighestEncodable()
Description copied from class: XmlWriter
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.

Specified by:
getHighestEncodable in class SingleByteXmlWriter
Returns:
Character code of the highest character that can be natively encoded.

writeRaw

public void writeRaw(char[] cbuf,
                     int offset,
                     int len)
              throws IOException,
                     XMLStreamException
Description copied from class: ByteXmlWriter
This method is heavily encoding-dependant, so it needs to be deferred to sub-classes

Specified by:
writeRaw in class SingleByteXmlWriter
Throws:
IOException
XMLStreamException

doConstructName

protected WName doConstructName(String localName)
                         throws XMLStreamException
Specified by:
doConstructName in class ByteXmlWriter
Throws:
XMLStreamException

doConstructName

protected WName doConstructName(String prefix,
                                String localName)
                         throws XMLStreamException
Specified by:
doConstructName in class ByteXmlWriter
Throws:
XMLStreamException


Copyright © 2012 Fasterxml.com. All Rights Reserved.