Class FastInfosetWriter

    • Field Summary

      • Fields inherited from class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer

        _attributesArray, _attributesArrayIndex, _currentLocalName, _currentPrefix, _currentUri, _encoding, _inStartElement, _isEmptyElement, _manager, _namespacesArray, _namespacesArrayIndex, _nsContext, _nsSupportContextStack, _stackCount
      • Fields inherited from class com.sun.xml.fastinfoset.Encoder

        _b, _characterEncodingSchemeSystemDefault, _charBuffer, _markIndex, _octetBuffer, _octetBufferIndex, _s, _terminate, _v, _vData, attributeValueMapTotalCharactersConstraint, CHARACTER_ENCODING_SCHEME_SYSTEM_PROPERTY, characterContentChunkMapTotalCharactersConstraint, maxAttributeValueSize, maxCharacterContentChunkSize, minAttributeValueSize, minCharacterContentChunkSize
      • Fields inherited from interface org.jvnet.fastinfoset.FastInfosetSerializer

        ATTRIBUTE_VALUE_MAP_MEMORY_CONSTRAINT, BUFFER_SIZE_PROPERTY, CHARACTER_CONTENT_CHUNK_MAP_MEMORY_CONSTRAINT, EXTERNAL_VOCABULARIES_PROPERTY, IGNORE_COMMENTS_FEATURE, IGNORE_DTD_FEATURE, IGNORE_PROCESSING_INSTRUCTIONS_FEATURE, IGNORE_WHITE_SPACE_TEXT_CONTENT_FEATURE, MAX_ATTRIBUTE_VALUE_SIZE, MAX_CHARACTER_CONTENT_CHUNK_SIZE, MIN_ATTRIBUTE_VALUE_SIZE, MIN_CHARACTER_CONTENT_CHUNK_SIZE, REGISTERED_ENCODING_ALGORITHMS_PROPERTY, UTF_16BE, UTF_8
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()
      Close the writer and its underlying stream.
      void endElement()
      Write the end tag for the current element.
      void flush()
      Flush the writer and its underlying stream.
      String getPrefix​(String uri)
      Return a prefix for the given URI.
      PrefixFactory getPrefixFactory()
      Return the prefix factory in use by this writer.
      String getURI​(String prefix)
      Return the URI for a given prefix.
      void reset()  
      void setPrefixFactory​(PrefixFactory factory)
      Set the prefix factory to be used by this writer.
      void startElement​(String localName)
      Write the start tag for an element.
      void startElement​(String localName, String uri)
      Write the start tag for an element.
      void startElement​(String localName, String uri, String prefix)
      Write the start tag for an element.
      void startElement​(QName name)
      Write the start tag for an element.
      void startElement​(QName name, String prefix)
      Write the start tag for an element.
      void writeAttribute​(String localName, String value)
      Write an attribute of the current element.
      void writeAttribute​(String localName, String uri, String value)
      Write an attribute of the current element.
      void writeAttribute​(QName name, String value)
      Write an attribute of the current element.
      void writeAttributeUnquoted​(String localName, String value)
      Write an attribute (unquoted) of the current element.
      void writeAttributeUnquoted​(String localName, String uri, String value)
      Write an attribute (unquoted) of the current element.
      void writeAttributeUnquoted​(QName name, String value)
      Write an attribute (unquoted) of the current element.
      void writeBytes​(byte[] b, int start, int length)
      Backdoor method to encode bytes using the base64 built-in algorithm that FI supports.
      void writeChars​(CDATA chars)
      Write character data within an element.
      void writeChars​(String chars)
      Write character data within an element.
      void writeCharsUnquoted​(char[] buf, int offset, int len)
      Write character data within an element, skipping quoting.
      void writeCharsUnquoted​(String chars)
      Write character data within an element, skipping quoting.
      void writeComment​(String comment)
      Write a comment within an element.
      void writeNamespaceDeclaration​(String uri)
      Write a namespace declaration of the current element.
      void writeNamespaceDeclaration​(String prefix, String uri)
      Write a namespace declaration of the current element.
      void writeStartDocument()  
      • Methods inherited from class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer

        encodeTerminationAndCurrentElement, getLocalNameIndex, getNamespaceContext, getNextAttributeIndex, getNextElementIndex, getNextLocalNameIndex, getProperty, initiateLowLevelWriting, setDefaultNamespace, setEncoding, setManager, setNamespaceContext, setPrefix, writeAttribute, writeCData, writeCharacters, writeCharacters, writeDefaultNamespace, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeEndDocument, writeEndElement, writeEntityRef, writeLowLevelAttribute, writeLowLevelAttributeIndexed, writeLowLevelAttributeValue, writeLowLevelEndElement, writeLowLevelEndNamespaces, writeLowLevelEndStartElement, writeLowLevelNamespace, writeLowLevelOctets, writeLowLevelStartAttributes, writeLowLevelStartElement, writeLowLevelStartElementIndexed, writeLowLevelStartNameLiteral, writeLowLevelStartNameLiteral, writeLowLevelStartNamespaces, writeLowLevelTerminationAndMark, writeLowLevelText, writeLowLevelText, writeNamespace, writeOctets, writeProcessingInstruction, writeProcessingInstruction, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement, writeStartElement
      • Methods inherited from class com.sun.xml.fastinfoset.Encoder

        canAddAttributeToTable, canAddCharacterContentToTable, encodeAIIBuiltInAlgorithmData, encodeAIIObjectAlgorithmData, encodeAIIOctetAlgorithmData, encodeAlphabetCharacters, encodeAttributeQualifiedNameOnSecondBit, encodeCharacters, encodeCharactersNoClone, encodeCIIBuiltInAlgorithmData, encodeCIIBuiltInAlgorithmDataAsCDATA, encodeCIIObjectAlgorithmData, encodeCIIOctetAlgorithmData, encodeComment, encodeCommentNoClone, encodeDateTimeFourBitCharacters, encodeDateTimeNonIdentifyingStringOnFirstBit, 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, encodeNumericFourBitCharacters, encodeNumericNonIdentifyingStringOnFirstBit, encodeProcessingInstruction, encodeTermination, encodeUtf16String, encodeUtf16String, encodeUTF8String, encodeUTF8String, getAttributeValueMapMemoryLimit, getCharacterContentChunkMapMemoryLimit, getCharacterEncodingScheme, getIgnoreComments, getIgnoreDTD, getIgnoreProcesingInstructions, getIgnoreWhiteSpaceTextContent, getMaxAttributeValueSize, getMaxCharacterContentChunkSize, getMinAttributeValueSize, getMinCharacterContentChunkSize, getPrefixFromQualifiedName, getRegisteredEncodingAlgorithms, getVocabularyApplicationData, hasMark, isAttributeValueLengthMatchesLimit, isCharacterContentChunkLengthMatchesLimit, isWhiteSpace, isWhiteSpace, mark, resetMark, setAttributeValueMapMemoryLimit, setCharacterContentChunkMapMemoryLimit, setCharacterEncodingScheme, setExternalVocabulary, setIgnoreComments, setIgnoreDTD, setIgnoreProcesingInstructions, setIgnoreWhiteSpaceTextContent, setMaxAttributeValueSize, setMaxCharacterContentChunkSize, setMinAttributeValueSize, setMinCharacterContentChunkSize, setOutputStream, setRegisteredEncodingAlgorithms, setVocabulary, setVocabularyApplicationData, write, write, write
    • Constructor Detail

    • Method Detail

      • reset

        public void reset()
        Specified by:
        reset in interface org.jvnet.fastinfoset.FastInfosetSerializer
        Overrides:
        reset in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • writeStartDocument

        public void writeStartDocument()
        Specified by:
        writeStartDocument in interface XMLStreamWriter
        Overrides:
        writeStartDocument in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • writeAttribute

        public void writeAttribute​(String localName,
                                   String value)
        Description copied from interface: XMLWriter
        Write an attribute of the current element.
        Specified by:
        writeAttribute in interface XMLStreamWriter
        Specified by:
        writeAttribute in interface XMLWriter
        Overrides:
        writeAttribute in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • startElement

        public void startElement​(QName name)
        Description copied from interface: XMLWriter
        Write the start tag for an element.
        Specified by:
        startElement in interface XMLWriter
      • startElement

        public void startElement​(String localName)
        Description copied from interface: XMLWriter
        Write the start tag for an element.
        Specified by:
        startElement in interface XMLWriter
      • startElement

        public void startElement​(QName name,
                                 String prefix)
        Description copied from interface: XMLWriter
        Write the start tag for an element.
        Specified by:
        startElement in interface XMLWriter
      • writeAttribute

        public void writeAttribute​(QName name,
                                   String value)
        Description copied from interface: XMLWriter
        Write an attribute of the current element.
        Specified by:
        writeAttribute in interface XMLWriter
      • writeNamespaceDeclaration

        public void writeNamespaceDeclaration​(String uri)
        Write a namespace declaration of the current element. The prefix name will be generated by the PrefixFactory currently configured for this writer.
        Specified by:
        writeNamespaceDeclaration in interface XMLWriter
      • writeChars

        public void writeChars​(String chars)
        Write character data within an element.
        Specified by:
        writeChars in interface XMLWriter
      • writeChars

        public void writeChars​(CDATA chars)
        Write character data within an element.
        Specified by:
        writeChars in interface XMLWriter
      • writeCharsUnquoted

        public void writeCharsUnquoted​(String chars)
        Write character data within an element, skipping quoting.
        Specified by:
        writeCharsUnquoted in interface XMLWriter
      • writeCharsUnquoted

        public void writeCharsUnquoted​(char[] buf,
                                       int offset,
                                       int len)
        Write character data within an element, skipping quoting.
        Specified by:
        writeCharsUnquoted in interface XMLWriter
      • writeComment

        public void writeComment​(String comment)
        Write a comment within an element.
        Specified by:
        writeComment in interface XMLStreamWriter
        Specified by:
        writeComment in interface XMLWriter
        Overrides:
        writeComment in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • endElement

        public void endElement()
        Write the end tag for the current element.
        Specified by:
        endElement in interface XMLWriter
      • getURI

        public String getURI​(String prefix)
        Return the URI for a given prefix. If the prefix is undeclared, return null.
        Specified by:
        getURI in interface XMLWriter
      • getPrefix

        public String getPrefix​(String uri)
        Return a prefix for the given URI.

        If no prefix for the given URI is in scope, return null.

        Specified by:
        getPrefix in interface XMLStreamWriter
        Specified by:
        getPrefix in interface XMLWriter
        Overrides:
        getPrefix in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • flush

        public void flush()
        Flush the writer and its underlying stream.
        Specified by:
        flush in interface XMLStreamWriter
        Specified by:
        flush in interface XMLWriter
        Overrides:
        flush in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • close

        public void close()
        Close the writer and its underlying stream.
        Specified by:
        close in interface XMLStreamWriter
        Specified by:
        close in interface XMLWriter
        Overrides:
        close in class com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
      • writeBytes

        public final void writeBytes​(byte[] b,
                                     int start,
                                     int length)
        Backdoor method to encode bytes using the base64 built-in algorithm that FI supports.