public class StreamWriterBufferCreator extends AbstractCreator implements org.jvnet.staxex.XMLStreamWriterEx
XMLStreamWriter
that fills MutableXMLStreamBuffer
.
TODO: need to retain all attributes/namespaces and then store all namespaces before the attributes. Currently it is necessary for the caller to ensure all namespaces are written before attributes and the caller must not intermix calls to the writeNamespace and writeAttribute methods.
Modifier and Type | Field and Description |
---|---|
protected List<String> |
attributeValuePrefixes |
_buffer
_contentCharactersBuffer, _contentCharactersBufferPtr, _contentObjects, _contentObjectsPtr, _currentContentCharactersBufferFragment, _currentContentObjectFragment, _currentStructureFragment, _currentStructureStringFragment, _structure, _structurePtr, _structureStrings, _structureStringsPtr, CHAR_ARRAY_LENGTH_MEDIUM, CHAR_ARRAY_LENGTH_MEDIUM_SIZE, CHAR_ARRAY_LENGTH_SMALL, CHAR_ARRAY_LENGTH_SMALL_SIZE, CONTENT_TYPE_CHAR_ARRAY, CONTENT_TYPE_CHAR_ARRAY_COPY, CONTENT_TYPE_OBJECT, CONTENT_TYPE_STRING, FLAG_DOCUMENT_FRAGMENT, FLAG_PREFIX, FLAG_QUALIFIED_NAME, FLAG_URI, T_ATTRIBUTE, T_ATTRIBUTE_LN, T_ATTRIBUTE_LN_OBJECT, T_ATTRIBUTE_P_U_LN, T_ATTRIBUTE_P_U_LN_OBJECT, T_ATTRIBUTE_U_LN, T_ATTRIBUTE_U_LN_OBJECT, T_ATTRIBUTE_U_LN_QN, T_ATTRIBUTE_U_LN_QN_OBJECT, T_COMMENT, T_COMMENT_AS_CHAR_ARRAY, T_COMMENT_AS_CHAR_ARRAY_COPY, T_COMMENT_AS_CHAR_ARRAY_MEDIUM, T_COMMENT_AS_CHAR_ARRAY_SMALL, T_COMMENT_AS_STRING, T_DOCUMENT, T_DOCUMENT_FRAGMENT, T_ELEMENT, T_ELEMENT_LN, T_ELEMENT_P_U_LN, T_ELEMENT_U_LN, T_ELEMENT_U_LN_QN, T_END, T_END_OF_BUFFER, T_NAMESPACE_ATTRIBUTE, T_NAMESPACE_ATTRIBUTE_P, T_NAMESPACE_ATTRIBUTE_P_U, T_NAMESPACE_ATTRIBUTE_U, T_PROCESSING_INSTRUCTION, T_TEXT, T_TEXT_AS_CHAR_ARRAY, T_TEXT_AS_CHAR_ARRAY_COPY, T_TEXT_AS_CHAR_ARRAY_MEDIUM, T_TEXT_AS_CHAR_ARRAY_SMALL, T_TEXT_AS_OBJECT, T_TEXT_AS_STRING, T_UNEXPANDED_ENTITY_REFERENCE, TYPE_MASK, VALUE_TYPE_OBJECT, VALUE_TYPE_STRING
Constructor and Description |
---|
StreamWriterBufferCreator() |
StreamWriterBufferCreator(MutableXMLStreamBuffer buffer) |
createBuffer, getXMLStreamBuffer, increaseTreeCount, peekAtContentObject, resizeContentCharacters, resizeContentObjects, resizeStructure, resizeStructureStrings, setBuffer, setHasInternedStrings, setXMLStreamBuffer, storeContentCharacters, storeContentCharactersCopy, storeContentObject, storeContentString, storeStructure, storeStructureString
public StreamWriterBufferCreator()
public StreamWriterBufferCreator(MutableXMLStreamBuffer buffer)
public Object getProperty(String str) throws IllegalArgumentException
getProperty
in interface XMLStreamWriter
IllegalArgumentException
public void close() throws XMLStreamException
close
in interface XMLStreamWriter
XMLStreamException
public void flush() throws XMLStreamException
flush
in interface XMLStreamWriter
XMLStreamException
public org.jvnet.staxex.NamespaceContextEx getNamespaceContext()
getNamespaceContext
in interface XMLStreamWriter
getNamespaceContext
in interface org.jvnet.staxex.XMLStreamWriterEx
public void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException
setNamespaceContext
in interface XMLStreamWriter
XMLStreamException
public void setDefaultNamespace(String namespaceURI) throws XMLStreamException
setDefaultNamespace
in interface XMLStreamWriter
XMLStreamException
public void setPrefix(String prefix, String namespaceURI) throws XMLStreamException
setPrefix
in interface XMLStreamWriter
XMLStreamException
public String getPrefix(String namespaceURI) throws XMLStreamException
getPrefix
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument() throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument(String version) throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartDocument(String encoding, String version) throws XMLStreamException
writeStartDocument
in interface XMLStreamWriter
XMLStreamException
public void writeEndDocument() throws XMLStreamException
writeEndDocument
in interface XMLStreamWriter
XMLStreamException
public void writeStartElement(String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public void writeStartElement(String namespaceURI, String localName) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeStartElement
in interface XMLStreamWriter
XMLStreamException
public void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeEmptyElement
in interface XMLStreamWriter
XMLStreamException
public void writeEndElement() throws XMLStreamException
writeEndElement
in interface XMLStreamWriter
XMLStreamException
public void writeDefaultNamespace(String namespaceURI) throws XMLStreamException
writeDefaultNamespace
in interface XMLStreamWriter
XMLStreamException
public void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException
writeNamespace
in interface XMLStreamWriter
XMLStreamException
public void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute
in interface XMLStreamWriter
XMLStreamException
public void writeCData(String data) throws XMLStreamException
writeCData
in interface XMLStreamWriter
XMLStreamException
public void writeCharacters(String charData) throws XMLStreamException
writeCharacters
in interface XMLStreamWriter
XMLStreamException
public void writeCharacters(char[] buf, int start, int len) throws XMLStreamException
writeCharacters
in interface XMLStreamWriter
XMLStreamException
public void writeComment(String str) throws XMLStreamException
writeComment
in interface XMLStreamWriter
XMLStreamException
public void writeDTD(String str) throws XMLStreamException
writeDTD
in interface XMLStreamWriter
XMLStreamException
public void writeEntityRef(String str) throws XMLStreamException
writeEntityRef
in interface XMLStreamWriter
XMLStreamException
public void writeProcessingInstruction(String target) throws XMLStreamException
writeProcessingInstruction
in interface XMLStreamWriter
XMLStreamException
public void writeProcessingInstruction(String target, String data) throws XMLStreamException
writeProcessingInstruction
in interface XMLStreamWriter
XMLStreamException
public void writePCDATA(CharSequence charSequence) throws XMLStreamException
writePCDATA
in interface org.jvnet.staxex.XMLStreamWriterEx
XMLStreamException
public void writeBinary(byte[] bytes, int offset, int length, String endpointURL) throws XMLStreamException
writeBinary
in interface org.jvnet.staxex.XMLStreamWriterEx
XMLStreamException
public void writeBinary(DataHandler dataHandler) throws XMLStreamException
writeBinary
in interface org.jvnet.staxex.XMLStreamWriterEx
XMLStreamException
public OutputStream writeBinary(String endpointURL) throws XMLStreamException
writeBinary
in interface org.jvnet.staxex.XMLStreamWriterEx
XMLStreamException
protected void storeQualifiedName(int item, String prefix, String uri, String localName)
protected final void storeAttribute(String prefix, String uri, String localName, String type, String value)
public final List getAttributeValuePrefixes()
protected final void storeProcessingInstruction(String target, String data)
public final boolean isCheckAttributeValue()
public final void setCheckAttributeValue(boolean value)
Copyright © 2006–2018. All rights reserved.