Package org.codehaus.jettison.mapped
Class MappedXMLStreamWriter
- java.lang.Object
-
- org.codehaus.jettison.AbstractXMLStreamWriter
-
- org.codehaus.jettison.mapped.MappedXMLStreamWriter
-
- All Implemented Interfaces:
XMLStreamWriter
public class MappedXMLStreamWriter extends AbstractXMLStreamWriter
-
-
Constructor Summary
Constructors Constructor Description MappedXMLStreamWriter(MappedNamespaceConvention convention, Writer writer)
-
Method Summary
-
Methods inherited from class org.codehaus.jettison.AbstractXMLStreamWriter
getSerializedAsArrays, isArrayKeysWithSlashAvailable, serializeAsArray, seriliazeAsArray, writeCData, writeCharacters, writeComment, writeDTD, writeEmptyElement, writeEmptyElement, writeEmptyElement, writeStartDocument, writeStartDocument, writeStartElement, writeStartElement
-
-
-
-
Field Detail
-
writer
protected Writer writer
-
-
Constructor Detail
-
MappedXMLStreamWriter
public MappedXMLStreamWriter(MappedNamespaceConvention convention, Writer writer)
-
-
Method Detail
-
getNamespaceContext
public NamespaceContext getNamespaceContext()
-
setNamespaceContext
public void setNamespaceContext(NamespaceContext context) throws XMLStreamException
- Throws:
XMLStreamException
-
getTextKey
public String getTextKey()
-
setValueKey
public void setValueKey(String valueKey)
-
writeStartDocument
public void writeStartDocument() throws XMLStreamException
- Throws:
XMLStreamException
-
writeStartElement
public void writeStartElement(String prefix, String local, String ns) throws XMLStreamException
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String prefix, String ns, String local, String value) throws XMLStreamException
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String ns, String local, String value) throws XMLStreamException
- Throws:
XMLStreamException
-
writeAttribute
public void writeAttribute(String local, String value) throws XMLStreamException
- Throws:
XMLStreamException
-
writeCharacters
public void writeCharacters(String text) throws XMLStreamException
- Throws:
XMLStreamException
-
writeEndElement
public void writeEndElement() throws XMLStreamException
- Throws:
XMLStreamException
-
writeEndDocument
public void writeEndDocument() throws XMLStreamException
- Specified by:
writeEndDocument
in interfaceXMLStreamWriter
- Overrides:
writeEndDocument
in classAbstractXMLStreamWriter
- Throws:
XMLStreamException
-
writeJSONObject
protected void writeJSONObject(JSONObject root) throws XMLStreamException
For clients who want to modify the output object before writing to override.- Parameters:
root
- root- Throws:
XMLStreamException
- XMLStreamException
-
close
public void close() throws XMLStreamException
- Throws:
XMLStreamException
-
flush
public void flush() throws XMLStreamException
- Throws:
XMLStreamException
-
getPrefix
public String getPrefix(String arg0) throws XMLStreamException
- Throws:
XMLStreamException
-
getProperty
public Object getProperty(String arg0) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
setDefaultNamespace
public void setDefaultNamespace(String arg0) throws XMLStreamException
- Throws:
XMLStreamException
-
setPrefix
public void setPrefix(String arg0, String arg1) throws XMLStreamException
- Throws:
XMLStreamException
-
writeDefaultNamespace
public void writeDefaultNamespace(String arg0) throws XMLStreamException
- Throws:
XMLStreamException
-
writeEntityRef
public void writeEntityRef(String arg0) throws XMLStreamException
- Throws:
XMLStreamException
-
writeNamespace
public void writeNamespace(String arg0, String arg1) throws XMLStreamException
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String arg0) throws XMLStreamException
- Throws:
XMLStreamException
-
writeProcessingInstruction
public void writeProcessingInstruction(String arg0, String arg1) throws XMLStreamException
- Throws:
XMLStreamException
-
getConvention
public MappedNamespaceConvention getConvention()
-
-