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,FastInfosetSerializer,LowLevelFastInfosetStreamWriter,ContentHandler,DTDHandler,EntityResolver,ErrorHandler
public class FastInfosetWriter extends 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, _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
-
-
Constructor Summary
Constructors Constructor Description FastInfosetWriter(OutputStream os, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Close the writer and its underlying stream.voidendElement()Write the end tag for the current element.voidflush()Flush the writer and its underlying stream.StringgetPrefix(String uri)Return a prefix for the given URI.PrefixFactorygetPrefixFactory()Return the prefix factory in use by this writer.StringgetURI(String prefix)Return the URI for a given prefix.voidreset()Reset the encoder for reuse encoding another XML infoset.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.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.voidwriteNamespaceDeclaration(String uri)Write a namespace declaration of the current element.voidwriteNamespaceDeclaration(String prefix, String uri)Write a namespace declaration of the current element.voidwriteStartDocument()-
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
-
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
-
-
-
-
Constructor Detail
-
FastInfosetWriter
public FastInfosetWriter(OutputStream os, String encoding)
-
-
Method Detail
-
reset
public void reset()
Description copied from class:EncoderReset the encoder for reuse encoding another XML infoset.- Specified by:
resetin interfaceFastInfosetSerializer- Overrides:
resetin classStAXDocumentSerializer
-
writeStartDocument
public void writeStartDocument()
- Specified by:
writeStartDocumentin interfaceXMLStreamWriter- Overrides:
writeStartDocumentin classStAXDocumentSerializer
-
writeAttribute
public void writeAttribute(String localName, String value)
Description copied from interface:XMLWriterWrite an attribute of the current element.- Specified by:
writeAttributein interfaceXMLStreamWriter- Specified by:
writeAttributein interfaceXMLWriter- Overrides:
writeAttributein classStAXDocumentSerializer
-
startElement
public void startElement(QName name)
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
public void startElement(String localName)
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
public void startElement(String localName, String uri)
Write the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
startElement
public void startElement(String localName, String uri, String prefix)
Write the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
writeAttribute
public void writeAttribute(String localName, String uri, String value)
Write an attribute of the current element.- Specified by:
writeAttributein interfaceXMLStreamWriter- Specified by:
writeAttributein interfaceXMLWriter- Overrides:
writeAttributein classStAXDocumentSerializer
-
startElement
public void startElement(QName name, String prefix)
Description copied from interface:XMLWriterWrite the start tag for an element.- Specified by:
startElementin interfaceXMLWriter
-
writeAttribute
public void writeAttribute(QName name, String value)
Description copied from interface:XMLWriterWrite an attribute of the current element.- Specified by:
writeAttributein interfaceXMLWriter
-
writeAttributeUnquoted
public void writeAttributeUnquoted(String localName, String value)
Write an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeAttributeUnquoted
public void writeAttributeUnquoted(String localName, String uri, String value)
Write an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeAttributeUnquoted
public void writeAttributeUnquoted(QName name, String value)
Description copied from interface:XMLWriterWrite an attribute (unquoted) of the current element.- Specified by:
writeAttributeUnquotedin interfaceXMLWriter
-
writeNamespaceDeclaration
public void writeNamespaceDeclaration(String prefix, String uri)
Write a namespace declaration of the current element.- Specified by:
writeNamespaceDeclarationin interfaceXMLWriter
-
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:
writeNamespaceDeclarationin interfaceXMLWriter
-
writeChars
public void writeChars(String chars)
Write character data within an element.- Specified by:
writeCharsin interfaceXMLWriter
-
writeChars
public void writeChars(CDATA chars)
Write character data within an element.- Specified by:
writeCharsin interfaceXMLWriter
-
writeCharsUnquoted
public void writeCharsUnquoted(String chars)
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
public void writeComment(String comment)
Write a comment within an element.- Specified by:
writeCommentin interfaceXMLStreamWriter- Specified by:
writeCommentin interfaceXMLWriter- Overrides:
writeCommentin classStAXDocumentSerializer
-
endElement
public void endElement()
Write the end tag for the current element.- Specified by:
endElementin interfaceXMLWriter
-
getPrefixFactory
public PrefixFactory getPrefixFactory()
Return the prefix factory in use by this writer.- Specified by:
getPrefixFactoryin interfaceXMLWriter
-
setPrefixFactory
public void setPrefixFactory(PrefixFactory factory)
Set the prefix factory to be used by this writer.- Specified by:
setPrefixFactoryin interfaceXMLWriter
-
getURI
public String getURI(String prefix)
Return the URI for a given prefix. If the prefix is undeclared, return null.
-
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:
getPrefixin interfaceXMLStreamWriter- Specified by:
getPrefixin interfaceXMLWriter- Overrides:
getPrefixin classStAXDocumentSerializer
-
flush
public void flush()
Flush the writer and its underlying stream.- Specified by:
flushin interfaceXMLStreamWriter- Specified by:
flushin interfaceXMLWriter- Overrides:
flushin classStAXDocumentSerializer
-
close
public void close()
Close the writer and its underlying stream.- Specified by:
closein interfaceXMLStreamWriter- Specified by:
closein interfaceXMLWriter- Overrides:
closein classStAXDocumentSerializer
-
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.
-
-