Top Fields Constructors Methods
org.codehaus.jettison

public abstract Class AbstractXMLStreamWriter

extends Object
implements XMLStreamWriter
Class Inheritance
All Implemented Interfaces
javax.xml.stream.XMLStreamWriter
Known Direct Subclasses
org.codehaus.jettison.badgerfish.BadgerFishXMLStreamWriter, org.codehaus.jettison.mapped.MappedXMLStreamWriter
Imports
java.util.ArrayList, javax.xml.stream.XMLStreamException, .XMLStreamWriter

Field Summary

Modifier and TypeField and Description
private boolean
private ArrayList<String>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ArrayList<String>
public boolean
public void
public void
seriliazeAsArray(String
the name
name
)

Deprecated since 1.2 because of misspelling. Use serializeAsArray(String name) instead.
public void
writeCData(String
the data contained in the CData Section, may not be null
text
)

Implements javax.xml.stream.XMLStreamWriter.writeCData.

Writes a CData section
public void
writeCharacters(char[]
the value to write
arg0
,
int
the starting position in the array
arg1
,
int
the number of characters to write
arg2
)

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output
public void
writeComment(String
the data contained in the comment, may be null
arg0
)

Implements javax.xml.stream.XMLStreamWriter.writeComment.

Writes an xml comment with the data enclosed
public void
writeDTD(String
the DTD to be written
arg0
)

Implements javax.xml.stream.XMLStreamWriter.writeDTD.

Write a DTD section.
public void
writeEmptyElement(String
the prefix of the tag, may not be null
prefix
,
String
local name of the tag, may not be null
local
,
String
the uri to bind the tag to, may not be null
ns
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output
public void
writeEmptyElement(String
the uri to bind the tag to, may not be null
ns
,
String
local name of the tag, may not be null
local
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output
public void
writeEmptyElement(String
local name of the tag, may not be null
local
)

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output
public void
writeEndDocument()

Implements javax.xml.stream.XMLStreamWriter.writeEndDocument.

Closes any start tags and writes corresponding end tags.
public void
writeStartDocument(String
encoding of the xml declaration
arg0
,
String
version of the xml document
arg1
)

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration.
public void
writeStartDocument(String
version of the xml document
arg0
)

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration.
public void
writeStartElement(String
the namespaceURI of the prefix to use, may not be null
ns
,
String
local name of the tag, may not be null
local
)

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output
public void
writeStartElement(String
local name of the tag, may not be null
local
)

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

arrayKeysWithSlashAvailableback to summary
private boolean arrayKeysWithSlashAvailable
serializedAsArraysback to summary
private ArrayList<String> serializedAsArrays

Constructor Detail

AbstractXMLStreamWriterback to summary
public AbstractXMLStreamWriter()

Method Detail

getSerializedAsArraysback to summary
public ArrayList<String> getSerializedAsArrays()
isArrayKeysWithSlashAvailableback to summary
public boolean isArrayKeysWithSlashAvailable()
serializeAsArrayback to summary
public void serializeAsArray(String name)
seriliazeAsArrayback to summary
public void seriliazeAsArray(String name)

Deprecated

since 1.2 because of misspelling. Use serializeAsArray(String name) instead.

Parameters
name:String

the name

Annotations
@Deprecated
writeCDataback to summary
public void writeCData(String text) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeCData.

Doc from javax.xml.stream.XMLStreamWriter.writeCData.

Writes a CData section

Parameters
text:String

the data contained in the CData Section, may not be null

Exceptions
XMLStreamException:
if an error occurs
writeCharactersback to summary
public void writeCharacters(char[] arg0, int arg1, int arg2) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeCharacters.

Doc from javax.xml.stream.XMLStreamWriter.writeCharacters.

Write text to the output

Parameters
arg0:char[]

the value to write

arg1:int

the starting position in the array

arg2:int

the number of characters to write

Exceptions
XMLStreamException:
if an error occurs
writeCommentback to summary
public void writeComment(String arg0) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeComment.

Doc from javax.xml.stream.XMLStreamWriter.writeComment.

Writes an xml comment with the data enclosed

Parameters
arg0:String

the data contained in the comment, may be null

Exceptions
XMLStreamException:
if an error occurs
writeDTDback to summary
public void writeDTD(String arg0) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeDTD.

Doc from javax.xml.stream.XMLStreamWriter.writeDTD.

Write a DTD section. This string represents the entire doctypedecl production from the XML 1.0 specification.

Parameters
arg0:String

the DTD to be written

Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(String prefix, String local, String ns) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

local:String

local name of the tag, may not be null

ns:String

the uri to bind the tag to, may not be null

Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(String ns, String local) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
ns:String

the uri to bind the tag to, may not be null

local:String

local name of the tag, may not be null

Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeEmptyElementback to summary
public void writeEmptyElement(String local) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Doc from javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output

Parameters
local:String

local name of the tag, may not be null

Exceptions
XMLStreamException:
if an error occurs
writeEndDocumentback to summary
public void writeEndDocument() throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeEndDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeEndDocument.

Closes any start tags and writes corresponding end tags.

Exceptions
XMLStreamException:
if an error occurs
writeStartDocumentback to summary
public void writeStartDocument(String arg0, String arg1) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration. Note that the encoding parameter does not set the actual encoding of the underlying output. That must be set when the instance of the XMLStreamWriter is created using the XMLOutputFactory

Parameters
arg0:String

encoding of the xml declaration

arg1:String

version of the xml document

Exceptions
XMLStreamException:
If given encoding does not match encoding of the underlying stream
writeStartDocumentback to summary
public void writeStartDocument(String arg0) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartDocument.

Doc from javax.xml.stream.XMLStreamWriter.writeStartDocument.

Write the XML Declaration. Defaults the XML version to 1.0

Parameters
arg0:String

version of the xml document

Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(String ns, String local) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output

Parameters
ns:String

the namespaceURI of the prefix to use, may not be null

local:String

local name of the tag, may not be null

Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeStartElementback to summary
public void writeStartElement(String local) throws XMLStreamException

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Doc from javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output. All writeStartElement methods open a new scope in the internal namespace context. Writing the corresponding EndElement causes the scope to be closed.

Parameters
local:String

local name of the tag, may not be null

Exceptions
XMLStreamException:
if an error occurs