Package com.sun.xml.rpc.streaming
Class FastInfosetWriter
java.lang.Object
org.xml.sax.helpers.DefaultHandler
com.sun.xml.fastinfoset.Encoder
com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
com.sun.xml.rpc.streaming.FastInfosetWriter
- All Implemented Interfaces:
XMLWriter,XMLStreamWriter,org.jvnet.fastinfoset.FastInfosetSerializer,org.jvnet.fastinfoset.stax.LowLevelFastInfosetStreamWriter,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class FastInfosetWriter
extends com.sun.xml.fastinfoset.stax.StAXDocumentSerializer
implements XMLWriter
-
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, _stackCountFields 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, minCharacterContentChunkSizeFields 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 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the writer and its underlying stream.voidWrite the end tag for the current element.voidflush()Flush the writer and its underlying stream.Return a prefix for the given URI.Return the prefix factory in use by this writer.Return the URI for a given prefix.voidreset()voidsetPrefixFactory(PrefixFactory factory) Set the prefix factory to be used by this writer.voidstartElement(String localName) Write the start tag for an element.voidstartElement(String localName, String uri) Write the start tag for an element.voidstartElement(String localName, String uri, String prefix) Write the start tag for an element.voidstartElement(QName name) Write the start tag for an element.voidstartElement(QName name, String prefix) Write the start tag for an element.voidwriteAttribute(String localName, String value) Write an attribute of the current element.voidwriteAttribute(String localName, String uri, String value) Write an attribute of the current element.voidwriteAttribute(QName name, String value) Write an attribute of the current element.voidwriteAttributeUnquoted(String localName, String value) Write an attribute (unquoted) of the current element.voidwriteAttributeUnquoted(String localName, String uri, String value) Write an attribute (unquoted) of the current element.voidwriteAttributeUnquoted(QName name, String value) Write an attribute (unquoted) of the current element.final voidwriteBytes(byte[] b, int start, int length) Backdoor method to encode bytes using the base64 built-in algorithm that FI supports.voidwriteChars(CDATA chars) Write character data within an element.voidwriteChars(String chars) Write character data within an element.voidwriteCharsUnquoted(char[] buf, int offset, int len) Write character data within an element, skipping quoting.voidwriteCharsUnquoted(String chars) Write character data within an element, skipping quoting.voidwriteComment(String comment) Write a comment within an element.voidWrite a namespace declaration of the current element.voidwriteNamespaceDeclaration(String prefix, String uri) Write a namespace declaration of the current element.voidMethods 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, writeStartElementMethods 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, writeMethods 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
-
Constructor Details
-
FastInfosetWriter
-
-
Method Details
-
reset
public void reset()- Specified by:
resetin interfaceorg.jvnet.fastinfoset.FastInfosetSerializer- Overrides:
resetin classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
writeStartDocument
public void writeStartDocument()- Specified by:
writeStartDocumentin interfaceXMLStreamWriter- Overrides:
writeStartDocumentin classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
writeAttribute
Description copied from interface:XMLWriterWrite an attribute of the current element.- Specified by:
writeAttributein interfaceXMLStreamWriter- Specified by:
writeAttributein interfaceXMLWriter- Overrides:
writeAttributein classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
startElement
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
Write the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
Write the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
writeAttribute
Write an attribute of the current element.- Specified by:
writeAttributein interfaceXMLStreamWriter- Specified by:
writeAttributein interfaceXMLWriter- Overrides:
writeAttributein classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
startElement
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
writeAttribute
Description copied from interface:XMLWriterWrite an attribute of the current element.- Specified by:
writeAttributein interfaceXMLWriter
-
writeAttributeUnquoted
Write an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeAttributeUnquoted
Write an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeAttributeUnquoted
Description copied from interface:XMLWriterWrite an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeNamespaceDeclaration
Write a namespace declaration of the current element.- Specified by:
writeNamespaceDeclarationin interfaceXMLWriter
-
writeNamespaceDeclaration
Write a namespace declaration of the current element. The prefix name will be generated by the PrefixFactory currently configured for this writer.- Specified by:
writeNamespaceDeclarationin interfaceXMLWriter
-
writeChars
Write character data within an element.- Specified by:
writeCharsin interfaceXMLWriter
-
writeChars
Write character data within an element.- Specified by:
writeCharsin interfaceXMLWriter
-
writeCharsUnquoted
Write character data within an element, skipping quoting.- Specified by:
writeCharsUnquotedin interfaceXMLWriter
-
writeCharsUnquoted
public void writeCharsUnquoted(char[] buf, int offset, int len) Write character data within an element, skipping quoting.- Specified by:
writeCharsUnquotedin interfaceXMLWriter
-
writeComment
Write a comment within an element.- Specified by:
writeCommentin interfaceXMLStreamWriter- Specified by:
writeCommentin interfaceXMLWriter- Overrides:
writeCommentin classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
endElement
public void endElement()Write the end tag for the current element.- Specified by:
endElementin interfaceXMLWriter
-
getPrefixFactory
Return the prefix factory in use by this writer.- Specified by:
getPrefixFactoryin interfaceXMLWriter
-
setPrefixFactory
Set the prefix factory to be used by this writer.- Specified by:
setPrefixFactoryin interfaceXMLWriter
-
getURI
Return the URI for a given prefix. If the prefix is undeclared, return null. -
getPrefix
Return a prefix for the given URI.If no prefix for the given URI is in scope, return null.
- Specified by:
getPrefixin interfaceXMLStreamWriter- Specified by:
getPrefixin interfaceXMLWriter- Overrides:
getPrefixin classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
flush
public void flush()Flush the writer and its underlying stream.- Specified by:
flushin interfaceXMLStreamWriter- Specified by:
flushin interfaceXMLWriter- Overrides:
flushin classcom.sun.xml.fastinfoset.stax.StAXDocumentSerializer
-
close
public void close()Close the writer and its underlying stream.- Specified by:
closein interfaceXMLStreamWriter- Specified by:
closein interfaceXMLWriter- Overrides:
closein classcom.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.
-