com.sun.xml.fastinfoset.stax
Class StAXDocumentSerializer

java.lang.Object
  extended by org.xml.sax.helpers.DefaultHandler
      extended by com.sun.xml.fastinfoset.Encoder
          extended by com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
All Implemented Interfaces:
javax.xml.stream.XMLStreamWriter, FastInfosetSerializer, LowLevelFastInfosetStreamWriter, org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler

public class StAXDocumentSerializer
extends Encoder
implements javax.xml.stream.XMLStreamWriter, LowLevelFastInfosetStreamWriter

The Fast Infoset StAX serializer.

Instantiate this serializer to serialize a fast infoset document in accordance with the StAX API.

More than one fast infoset document may be encoded to the OutputStream.


Field Summary
protected  java.lang.String[] _attributesArray
          List of attributes qnames and values defined in the current element.
protected  int _attributesArrayIndex
           
protected  java.lang.String _currentLocalName
          Local name of current element.
protected  java.lang.String _currentPrefix
          Prefix of current element.
protected  java.lang.String _currentUri
          Namespace of current element.
protected  java.lang.String _encoding
           
protected  boolean _inStartElement
          This flag indicates when there is a pending start element event.
protected  boolean _isEmptyElement
          This flag indicates if the current element is empty.
protected  StAXManager _manager
           
protected  java.lang.String[] _namespacesArray
          List of namespaces defined in the current element.
protected  int _namespacesArrayIndex
           
protected  NamespaceContextImplementation _nsContext
          Mapping between uris and prefixes.
protected  boolean[] _nsSupportContextStack
           
protected  int _stackCount
           
 
Fields inherited from class com.sun.xml.fastinfoset.Encoder
_b, _characterEncodingSchemeSystemDefault, _charBuffer, _markIndex, _octetBuffer, _octetBufferIndex, _s, _terminate, _v, _vData, attributeValueMapTotalCharactersConstraint, attributeValueSizeConstraint, CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY, characterContentChunkMapTotalCharactersConstraint, characterContentChunkSizeContraint, DATE_TIME_CHARACTERS_TABLE, NUMERIC_CHARACTERS_TABLE
 
Fields inherited from interface org.jvnet.fastinfoset.FastInfosetSerializer
ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT, ATTRIBUTE_VALUE_SIZE_CONSTRAINT, BUFFER_SIZE_PROPERTY, CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT, CHARACTER_CONTENT_CHUNK_SIZE_CONSTRAINT, EXTERNAL_VOCABULARIES_PROPERTY, IGNORE_COMMENTS_FEATURE, IGNORE_DTD_FEATURE, IGNORE_PROCESSING_INSTRUCTIONS_FEATURE, IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, UTF_16BE, UTF_8
 
Constructor Summary
StAXDocumentSerializer()
           
StAXDocumentSerializer(java.io.OutputStream outputStream)
           
StAXDocumentSerializer(java.io.OutputStream outputStream, StAXManager manager)
           
 
Method Summary
 void close()
           
protected  void encodeTerminationAndCurrentElement(boolean terminateAfter)
           
 void flush()
           
 int getLocalNameIndex()
          Get the current index that was applied to an [local name] of an Element or Attribute Information Item.
 javax.xml.namespace.NamespaceContext getNamespaceContext()
           
 int getNextAttributeIndex()
          Get the next index to apply to an Attribute Information Item.
 int getNextElementIndex()
          Get the next index to apply to an Element Information Item.
 int getNextLocalNameIndex()
          Get the next index to apply to an [local name] of an Element or Attribute Information Item.
 java.lang.String getPrefix(java.lang.String uri)
           
 java.lang.Object getProperty(java.lang.String name)
           
 void initiateLowLevelWriting()
          Initiate low level writing of an element fragment.
 void reset()
          Reset the encoder for reuse encoding another XML infoset.
 void setDefaultNamespace(java.lang.String uri)
           
 void setEncoding(java.lang.String encoding)
           
 void setManager(StAXManager manager)
           
 void setNamespaceContext(javax.xml.namespace.NamespaceContext context)
          Sets the current namespace context for prefix and uri bindings.
 void setPrefix(java.lang.String prefix, java.lang.String uri)
           
 void writeAttribute(java.lang.String localName, java.lang.String value)
           
 void writeAttribute(java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
           
 void writeAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName, java.lang.String value)
           
 void writeCData(java.lang.String data)
           
 void writeCharacters(char[] text, int start, int len)
           
 void writeCharacters(java.lang.String text)
           
 void writeComment(java.lang.String data)
           
 void writeDefaultNamespace(java.lang.String namespaceURI)
           
 void writeDTD(java.lang.String dtd)
           
 void writeEmptyElement(java.lang.String localName)
           
 void writeEmptyElement(java.lang.String namespaceURI, java.lang.String localName)
           
 void writeEmptyElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)
           
 void writeEndDocument()
           
 void writeEndElement()
           
 void writeEntityRef(java.lang.String name)
           
 boolean writeLowLevelAttribute(java.lang.String prefix, java.lang.String namespaceURI, java.lang.String localName)
          Write an attribute.
 void writeLowLevelAttributeIndexed(int index)
           
 void writeLowLevelAttributeValue(java.lang.String value)
           
 void writeLowLevelEndElement()
           
 void writeLowLevelEndNamespaces()
           
 void writeLowLevelEndStartElement()
           
 void writeLowLevelNamespace(java.lang.String prefix, java.lang.String namespaceName)
           
 void writeLowLevelOctets(byte[] octets, int length)
           
 void writeLowLevelStartAttributes()
           
 boolean writeLowLevelStartElement(int type, java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)
          Write the start of an element.
 void writeLowLevelStartElementIndexed(int type, int index)
           
 void writeLowLevelStartNameLiteral(int type, java.lang.String prefix, byte[] utf8LocalName, java.lang.String namespaceURI)
           
 void writeLowLevelStartNameLiteral(int type, java.lang.String prefix, int localNameIndex, java.lang.String namespaceURI)
           
 void writeLowLevelStartNamespaces()
           
 void writeLowLevelTerminationAndMark()
           
 void writeLowLevelText(char[] text, int length)
           
 void writeLowLevelText(java.lang.String text)
           
 void writeNamespace(java.lang.String prefix, java.lang.String namespaceURI)
           
 void writeOctets(byte[] b, int start, int len)
           
 void writeProcessingInstruction(java.lang.String target)
           
 void writeProcessingInstruction(java.lang.String target, java.lang.String data)
           
 void writeStartDocument()
           
 void writeStartDocument(java.lang.String version)
           
 void writeStartDocument(java.lang.String encoding, java.lang.String version)
           
 void writeStartElement(java.lang.String localName)
           
 void writeStartElement(java.lang.String namespaceURI, java.lang.String localName)
           
 void writeStartElement(java.lang.String prefix, java.lang.String localName, java.lang.String namespaceURI)
           
 
Methods inherited from class com.sun.xml.fastinfoset.Encoder
encodeAIIBuiltInAlgorithmData, encodeAIIObjectAlgorithmData, encodeAIIOctetAlgorithmData, encodeAlphabetCharacters, encodeAttributeQualifiedNameOnSecondBit, encodeCharacters, encodeCharactersNoClone, encodeCIIBuiltInAlgorithmData, encodeCIIBuiltInAlgorithmDataAsCDATA, encodeCIIObjectAlgorithmData, encodeCIIOctetAlgorithmData, encodeComment, encodeCommentNoClone, encodeDocumentTermination, encodeDocumentTypeDeclaration, encodeElementQualifiedNameOnThirdBit, encodeElementTermination, encodeFourBitCharacters, encodeHeader, encodeIdentifyingNonEmptyStringOnFirstBit, encodeInitialVocabulary, encodeLiteralAttributeQualifiedNameOnSecondBit, encodeLiteralElementQualifiedNameOnThirdBit, encodeNamespaceAttribute, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnFifthBit, encodeNonEmptyCharacterStringOnSeventhBit, encodeNonEmptyFourBitCharacterString, encodeNonEmptyFourBitCharacterStringOnSeventhBit, encodeNonEmptyNBitCharacterStringOnSeventhBit, encodeNonEmptyOctetStringOnSecondBit, encodeNonEmptyUTF8StringAsOctetString, encodeNonEmptyUTF8StringAsOctetString, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnFirstBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonIdentifyingStringOnThirdBit, encodeNonZeroInteger, encodeNonZeroIntegerOnFourthBit, encodeNonZeroIntegerOnSecondBitFirstBitOne, encodeNonZeroIntegerOnSecondBitFirstBitZero, encodeNonZeroIntegerOnThirdBit, encodeNonZeroOctetStringLength, encodeNonZeroOctetStringLengthOnFifthBit, encodeNonZeroOctetStringLengthOnSecondBit, encodeNonZeroOctetStringLengthOnSenventhBit, encodeProcessingInstruction, encodeTermination, encodeUtf16String, encodeUtf16String, encodeUTF8String, encodeUTF8String, getAttributeValueMapMemoryLimit, getAttributeValueSizeLimit, getCharacterContentChunkMapMemoryLimit, getCharacterContentChunkSizeLimit, getCharacterEncodingScheme, getIgnoreComments, getIgnoreDTD, getIgnoreProcesingInstructions, getIgnoreWhiteSpaceTextContent, getPrefixFromQualifiedName, getRegisteredEncodingAlgorithms, getVocabularyApplicationData, hasMark, isAttributeValueLengthMatchesLimit, isCharacterContentChunkLengthMatchesLimit, isWhiteSpace, isWhiteSpace, mark, resetMark, setAttributeValueMapMemoryLimit, setAttributeValueSizeLimit, setCharacterContentChunkMapMemoryLimit, setCharacterContentChunkSizeLimit, setCharacterEncodingScheme, setExternalVocabulary, setIgnoreComments, setIgnoreDTD, setIgnoreProcesingInstructions, setIgnoreWhiteSpaceTextContent, setOutputStream, setRegisteredEncodingAlgorithms, setVocabulary, setVocabularyApplicationData, write, write, write
 
Methods inherited from class org.xml.sax.helpers.DefaultHandler
characters, endDocument, endElement, endPrefixMapping, error, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_manager

protected StAXManager _manager

_encoding

protected java.lang.String _encoding

_currentLocalName

protected java.lang.String _currentLocalName
Local name of current element.


_currentUri

protected java.lang.String _currentUri
Namespace of current element.


_currentPrefix

protected java.lang.String _currentPrefix
Prefix of current element.


_inStartElement

protected boolean _inStartElement
This flag indicates when there is a pending start element event.


_isEmptyElement

protected boolean _isEmptyElement
This flag indicates if the current element is empty.


_attributesArray

protected java.lang.String[] _attributesArray
List of attributes qnames and values defined in the current element.


_attributesArrayIndex

protected int _attributesArrayIndex

_nsSupportContextStack

protected boolean[] _nsSupportContextStack

_stackCount

protected int _stackCount

_nsContext

protected NamespaceContextImplementation _nsContext
Mapping between uris and prefixes.


_namespacesArray

protected java.lang.String[] _namespacesArray
List of namespaces defined in the current element.


_namespacesArrayIndex

protected int _namespacesArrayIndex
Constructor Detail

StAXDocumentSerializer

public StAXDocumentSerializer()

StAXDocumentSerializer

public StAXDocumentSerializer(java.io.OutputStream outputStream)

StAXDocumentSerializer

public StAXDocumentSerializer(java.io.OutputStream outputStream,
                              StAXManager manager)
Method Detail

reset

public void reset()
Description copied from class: Encoder
Reset the encoder for reuse encoding another XML infoset.

Specified by:
reset in interface FastInfosetSerializer
Overrides:
reset in class Encoder

writeStartDocument

public void writeStartDocument()
                        throws javax.xml.stream.XMLStreamException
Specified by:
writeStartDocument in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeStartDocument

public void writeStartDocument(java.lang.String version)
                        throws javax.xml.stream.XMLStreamException
Specified by:
writeStartDocument in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeStartDocument

public void writeStartDocument(java.lang.String encoding,
                               java.lang.String version)
                        throws javax.xml.stream.XMLStreamException
Specified by:
writeStartDocument in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEndDocument

public void writeEndDocument()
                      throws javax.xml.stream.XMLStreamException
Specified by:
writeEndDocument in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

close

public void close()
           throws javax.xml.stream.XMLStreamException
Specified by:
close in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

flush

public void flush()
           throws javax.xml.stream.XMLStreamException
Specified by:
flush in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeStartElement

public void writeStartElement(java.lang.String localName)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeStartElement

public void writeStartElement(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeStartElement

public void writeStartElement(java.lang.String prefix,
                              java.lang.String localName,
                              java.lang.String namespaceURI)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeStartElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEmptyElement

public void writeEmptyElement(java.lang.String localName)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEmptyElement

public void writeEmptyElement(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEmptyElement

public void writeEmptyElement(java.lang.String prefix,
                              java.lang.String localName,
                              java.lang.String namespaceURI)
                       throws javax.xml.stream.XMLStreamException
Specified by:
writeEmptyElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEndElement

public void writeEndElement()
                     throws javax.xml.stream.XMLStreamException
Specified by:
writeEndElement in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeAttribute

public void writeAttribute(java.lang.String localName,
                           java.lang.String value)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeAttribute in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeAttribute

public void writeAttribute(java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String value)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeAttribute in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeAttribute

public void writeAttribute(java.lang.String prefix,
                           java.lang.String namespaceURI,
                           java.lang.String localName,
                           java.lang.String value)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeAttribute in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeNamespace

public void writeNamespace(java.lang.String prefix,
                           java.lang.String namespaceURI)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeNamespace in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeDefaultNamespace

public void writeDefaultNamespace(java.lang.String namespaceURI)
                           throws javax.xml.stream.XMLStreamException
Specified by:
writeDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeComment

public void writeComment(java.lang.String data)
                  throws javax.xml.stream.XMLStreamException
Specified by:
writeComment in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeProcessingInstruction

public void writeProcessingInstruction(java.lang.String target)
                                throws javax.xml.stream.XMLStreamException
Specified by:
writeProcessingInstruction in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeProcessingInstruction

public void writeProcessingInstruction(java.lang.String target,
                                       java.lang.String data)
                                throws javax.xml.stream.XMLStreamException
Specified by:
writeProcessingInstruction in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeCData

public void writeCData(java.lang.String data)
                throws javax.xml.stream.XMLStreamException
Specified by:
writeCData in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeDTD

public void writeDTD(java.lang.String dtd)
              throws javax.xml.stream.XMLStreamException
Specified by:
writeDTD in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeEntityRef

public void writeEntityRef(java.lang.String name)
                    throws javax.xml.stream.XMLStreamException
Specified by:
writeEntityRef in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeCharacters

public void writeCharacters(java.lang.String text)
                     throws javax.xml.stream.XMLStreamException
Specified by:
writeCharacters in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

writeCharacters

public void writeCharacters(char[] text,
                            int start,
                            int len)
                     throws javax.xml.stream.XMLStreamException
Specified by:
writeCharacters in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

getPrefix

public java.lang.String getPrefix(java.lang.String uri)
                           throws javax.xml.stream.XMLStreamException
Specified by:
getPrefix in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

setPrefix

public void setPrefix(java.lang.String prefix,
                      java.lang.String uri)
               throws javax.xml.stream.XMLStreamException
Specified by:
setPrefix in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

setDefaultNamespace

public void setDefaultNamespace(java.lang.String uri)
                         throws javax.xml.stream.XMLStreamException
Specified by:
setDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
Throws:
javax.xml.stream.XMLStreamException

setNamespaceContext

public void setNamespaceContext(javax.xml.namespace.NamespaceContext context)
                         throws javax.xml.stream.XMLStreamException
Sets the current namespace context for prefix and uri bindings. This context becomes the root namespace context for writing and will replace the current root namespace context. Subsequent calls to setPrefix and setDefaultNamespace will bind namespaces using the context passed to the method as the root context for resolving namespaces. This method may only be called once at the start of the document. It does not cause the namespaces to be declared. If a namespace URI to prefix mapping is found in the namespace context it is treated as declared and the prefix may be used by the StreamWriter.

Specified by:
setNamespaceContext in interface javax.xml.stream.XMLStreamWriter
Parameters:
context - the namespace context to use for this writer, may not be null
Throws:
javax.xml.stream.XMLStreamException

getNamespaceContext

public javax.xml.namespace.NamespaceContext getNamespaceContext()
Specified by:
getNamespaceContext in interface javax.xml.stream.XMLStreamWriter

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws java.lang.IllegalArgumentException
Specified by:
getProperty in interface javax.xml.stream.XMLStreamWriter
Throws:
java.lang.IllegalArgumentException

setManager

public void setManager(StAXManager manager)

setEncoding

public void setEncoding(java.lang.String encoding)

writeOctets

public void writeOctets(byte[] b,
                        int start,
                        int len)
                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

encodeTerminationAndCurrentElement

protected void encodeTerminationAndCurrentElement(boolean terminateAfter)
                                           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

initiateLowLevelWriting

public final void initiateLowLevelWriting()
                                   throws javax.xml.stream.XMLStreamException
Description copied from interface: LowLevelFastInfosetStreamWriter
Initiate low level writing of an element fragment.

This method must be invoked before other low level method.

Specified by:
initiateLowLevelWriting in interface LowLevelFastInfosetStreamWriter
Throws:
javax.xml.stream.XMLStreamException

getNextElementIndex

public final int getNextElementIndex()
Description copied from interface: LowLevelFastInfosetStreamWriter
Get the next index to apply to an Element Information Item.

This will increment the next obtained index such that:

 i = w.getNextElementIndex();
 j = w.getNextElementIndex();
 i == j + 1;
 

Specified by:
getNextElementIndex in interface LowLevelFastInfosetStreamWriter
Returns:
the index.

getNextAttributeIndex

public final int getNextAttributeIndex()
Description copied from interface: LowLevelFastInfosetStreamWriter
Get the next index to apply to an Attribute Information Item. This will increment the next obtained index such that:
 i = w.getNextAttributeIndex();
 j = w.getNextAttributeIndex();
 i == j + 1;
 

Specified by:
getNextAttributeIndex in interface LowLevelFastInfosetStreamWriter
Returns:
the index.

getLocalNameIndex

public final int getLocalNameIndex()
Description copied from interface: LowLevelFastInfosetStreamWriter
Get the current index that was applied to an [local name] of an Element or Attribute Information Item.

Specified by:
getLocalNameIndex in interface LowLevelFastInfosetStreamWriter
Returns:
the index.

getNextLocalNameIndex

public final int getNextLocalNameIndex()
Description copied from interface: LowLevelFastInfosetStreamWriter
Get the next index to apply to an [local name] of an Element or Attribute Information Item. This will increment the next obtained index such that:
 i = w.getNextLocalNameIndex();
 j = w.getNextLocalNameIndex();
 i == j + 1;
 

Specified by:
getNextLocalNameIndex in interface LowLevelFastInfosetStreamWriter
Returns:
the index.

writeLowLevelTerminationAndMark

public final void writeLowLevelTerminationAndMark()
                                           throws java.io.IOException
Specified by:
writeLowLevelTerminationAndMark in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelStartElementIndexed

public final void writeLowLevelStartElementIndexed(int type,
                                                   int index)
                                            throws java.io.IOException
Specified by:
writeLowLevelStartElementIndexed in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelStartElement

public final boolean writeLowLevelStartElement(int type,
                                               java.lang.String prefix,
                                               java.lang.String localName,
                                               java.lang.String namespaceURI)
                                        throws java.io.IOException
Description copied from interface: LowLevelFastInfosetStreamWriter
Write the start of an element.

Specified by:
writeLowLevelStartElement in interface LowLevelFastInfosetStreamWriter
Returns:
true if element is indexed, otherwise false.
Throws:
java.io.IOException

writeLowLevelStartNamespaces

public final void writeLowLevelStartNamespaces()
                                        throws java.io.IOException
Specified by:
writeLowLevelStartNamespaces in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelNamespace

public final void writeLowLevelNamespace(java.lang.String prefix,
                                         java.lang.String namespaceName)
                                  throws java.io.IOException
Specified by:
writeLowLevelNamespace in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelEndNamespaces

public final void writeLowLevelEndNamespaces()
                                      throws java.io.IOException
Specified by:
writeLowLevelEndNamespaces in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelStartAttributes

public final void writeLowLevelStartAttributes()
                                        throws java.io.IOException
Specified by:
writeLowLevelStartAttributes in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelAttributeIndexed

public final void writeLowLevelAttributeIndexed(int index)
                                         throws java.io.IOException
Specified by:
writeLowLevelAttributeIndexed in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelAttribute

public final boolean writeLowLevelAttribute(java.lang.String prefix,
                                            java.lang.String namespaceURI,
                                            java.lang.String localName)
                                     throws java.io.IOException
Description copied from interface: LowLevelFastInfosetStreamWriter
Write an attribute.

Specified by:
writeLowLevelAttribute in interface LowLevelFastInfosetStreamWriter
Returns:
true if attribute is indexed, otherwise false.
Throws:
java.io.IOException

writeLowLevelAttributeValue

public final void writeLowLevelAttributeValue(java.lang.String value)
                                       throws java.io.IOException
Specified by:
writeLowLevelAttributeValue in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelStartNameLiteral

public final void writeLowLevelStartNameLiteral(int type,
                                                java.lang.String prefix,
                                                byte[] utf8LocalName,
                                                java.lang.String namespaceURI)
                                         throws java.io.IOException
Specified by:
writeLowLevelStartNameLiteral in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelStartNameLiteral

public final void writeLowLevelStartNameLiteral(int type,
                                                java.lang.String prefix,
                                                int localNameIndex,
                                                java.lang.String namespaceURI)
                                         throws java.io.IOException
Specified by:
writeLowLevelStartNameLiteral in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelEndStartElement

public final void writeLowLevelEndStartElement()
                                        throws java.io.IOException
Specified by:
writeLowLevelEndStartElement in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelEndElement

public final void writeLowLevelEndElement()
                                   throws java.io.IOException
Specified by:
writeLowLevelEndElement in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelText

public final void writeLowLevelText(char[] text,
                                    int length)
                             throws java.io.IOException
Specified by:
writeLowLevelText in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelText

public final void writeLowLevelText(java.lang.String text)
                             throws java.io.IOException
Specified by:
writeLowLevelText in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException

writeLowLevelOctets

public final void writeLowLevelOctets(byte[] octets,
                                      int length)
                               throws java.io.IOException
Specified by:
writeLowLevelOctets in interface LowLevelFastInfosetStreamWriter
Throws:
java.io.IOException