com.sun.xml.stream.buffer.stax
Class StreamWriterBufferCreator
java.lang.Object
com.sun.xml.stream.buffer.AbstractCreatorProcessor
com.sun.xml.stream.buffer.AbstractCreator
com.sun.xml.stream.buffer.stax.StreamWriterBufferCreator
- All Implemented Interfaces:
- javax.xml.stream.XMLStreamWriter, org.jvnet.staxex.XMLStreamWriterEx
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.
| Fields inherited from class com.sun.xml.stream.buffer.AbstractCreatorProcessor |
_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 |
|
Method Summary |
void |
close()
|
void |
flush()
|
List |
getAttributeValuePrefixes()
|
org.jvnet.staxex.NamespaceContextEx |
getNamespaceContext()
|
String |
getPrefix(String namespaceURI)
|
Object |
getProperty(String str)
|
boolean |
isCheckAttributeValue()
|
void |
setCheckAttributeValue(boolean value)
|
void |
setDefaultNamespace(String namespaceURI)
|
void |
setNamespaceContext(NamespaceContext namespaceContext)
|
void |
setPrefix(String prefix,
String namespaceURI)
|
protected void |
storeAttribute(String prefix,
String uri,
String localName,
String type,
String value)
|
protected void |
storeNamespaceAttribute(String prefix,
String uri)
|
protected void |
storeProcessingInstruction(String target,
String data)
|
protected void |
storeQualifiedName(int item,
String prefix,
String uri,
String localName)
|
void |
writeAttribute(String localName,
String value)
|
void |
writeAttribute(String namespaceURI,
String localName,
String value)
|
void |
writeAttribute(String prefix,
String namespaceURI,
String localName,
String value)
|
void |
writeBinary(byte[] bytes,
int offset,
int length,
String endpointURL)
|
void |
writeBinary(javax.activation.DataHandler dataHandler)
|
OutputStream |
writeBinary(String endpointURL)
|
void |
writeCData(String data)
|
void |
writeCharacters(char[] buf,
int start,
int len)
|
void |
writeCharacters(String charData)
|
void |
writeComment(String str)
|
void |
writeDefaultNamespace(String namespaceURI)
|
void |
writeDTD(String str)
|
void |
writeEmptyElement(String localName)
|
void |
writeEmptyElement(String namespaceURI,
String localName)
|
void |
writeEmptyElement(String prefix,
String localName,
String namespaceURI)
|
void |
writeEndDocument()
|
void |
writeEndElement()
|
void |
writeEntityRef(String str)
|
void |
writeNamespace(String prefix,
String namespaceURI)
|
void |
writePCDATA(CharSequence charSequence)
|
void |
writeProcessingInstruction(String target)
|
void |
writeProcessingInstruction(String target,
String data)
|
void |
writeStartDocument()
|
void |
writeStartDocument(String version)
|
void |
writeStartDocument(String encoding,
String version)
|
void |
writeStartElement(String localName)
|
void |
writeStartElement(String namespaceURI,
String localName)
|
void |
writeStartElement(String prefix,
String localName,
String namespaceURI)
|
| Methods inherited from class com.sun.xml.stream.buffer.AbstractCreator |
createBuffer, getXMLStreamBuffer, increaseTreeCount, peekAtContentObject, resizeContentCharacters, resizeContentObjects, resizeStructure, resizeStructureStrings, setBuffer, setHasInternedStrings, setXMLStreamBuffer, storeContentCharacters, storeContentCharactersCopy, storeContentObject, storeContentString, storeStructure, storeStructureString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
attributeValuePrefixes
protected List<String> attributeValuePrefixes
StreamWriterBufferCreator
public StreamWriterBufferCreator()
StreamWriterBufferCreator
public StreamWriterBufferCreator(MutableXMLStreamBuffer buffer)
getProperty
public Object getProperty(String str)
throws IllegalArgumentException
- Specified by:
getProperty in interface javax.xml.stream.XMLStreamWriter
- Throws:
IllegalArgumentException
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
getNamespaceContext
public org.jvnet.staxex.NamespaceContextEx getNamespaceContext()
- Specified by:
getNamespaceContext in interface javax.xml.stream.XMLStreamWriter- Specified by:
getNamespaceContext in interface org.jvnet.staxex.XMLStreamWriterEx
setNamespaceContext
public void setNamespaceContext(NamespaceContext namespaceContext)
throws javax.xml.stream.XMLStreamException
- Specified by:
setNamespaceContext in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
setDefaultNamespace
public void setDefaultNamespace(String namespaceURI)
throws javax.xml.stream.XMLStreamException
- Specified by:
setDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
setPrefix
public void setPrefix(String prefix,
String namespaceURI)
throws javax.xml.stream.XMLStreamException
- Specified by:
setPrefix in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
getPrefix
public String getPrefix(String namespaceURI)
throws javax.xml.stream.XMLStreamException
- Specified by:
getPrefix in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
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(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(String encoding,
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
writeStartElement
public void writeStartElement(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(String namespaceURI,
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(String prefix,
String localName,
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(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(String namespaceURI,
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(String prefix,
String localName,
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
writeDefaultNamespace
public void writeDefaultNamespace(String namespaceURI)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeDefaultNamespace in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeNamespace
public void writeNamespace(String prefix,
String namespaceURI)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeNamespace in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeAttribute
public void writeAttribute(String localName,
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(String namespaceURI,
String localName,
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(String prefix,
String namespaceURI,
String localName,
String value)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeAttribute in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeCData
public void writeCData(String data)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeCData in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeCharacters
public void writeCharacters(String charData)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeCharacters in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeCharacters
public void writeCharacters(char[] buf,
int start,
int len)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeCharacters in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeComment
public void writeComment(String str)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeComment in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeDTD
public void writeDTD(String str)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeDTD in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeEntityRef
public void writeEntityRef(String str)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeEntityRef in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writeProcessingInstruction
public void writeProcessingInstruction(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(String target,
String data)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeProcessingInstruction in interface javax.xml.stream.XMLStreamWriter
- Throws:
javax.xml.stream.XMLStreamException
writePCDATA
public void writePCDATA(CharSequence charSequence)
throws javax.xml.stream.XMLStreamException
- Specified by:
writePCDATA in interface org.jvnet.staxex.XMLStreamWriterEx
- Throws:
javax.xml.stream.XMLStreamException
writeBinary
public void writeBinary(byte[] bytes,
int offset,
int length,
String endpointURL)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeBinary in interface org.jvnet.staxex.XMLStreamWriterEx
- Throws:
javax.xml.stream.XMLStreamException
writeBinary
public void writeBinary(javax.activation.DataHandler dataHandler)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeBinary in interface org.jvnet.staxex.XMLStreamWriterEx
- Throws:
javax.xml.stream.XMLStreamException
writeBinary
public OutputStream writeBinary(String endpointURL)
throws javax.xml.stream.XMLStreamException
- Specified by:
writeBinary in interface org.jvnet.staxex.XMLStreamWriterEx
- Throws:
javax.xml.stream.XMLStreamException
storeQualifiedName
protected void storeQualifiedName(int item,
String prefix,
String uri,
String localName)
storeNamespaceAttribute
protected final void storeNamespaceAttribute(String prefix,
String uri)
storeAttribute
protected final void storeAttribute(String prefix,
String uri,
String localName,
String type,
String value)
getAttributeValuePrefixes
public final List getAttributeValuePrefixes()
storeProcessingInstruction
protected final void storeProcessingInstruction(String target,
String data)
isCheckAttributeValue
public final boolean isCheckAttributeValue()
setCheckAttributeValue
public final void setCheckAttributeValue(boolean value)
Copyright © 2006-2011. All Rights Reserved.