Top Description Fields Constructors Methods
com.fasterxml.aalto.out

public final Class NonRepairingStreamWriter

extends StreamWriterBase
Class Inheritance
Imports
javax.xml.namespace.QName, javax.xml.stream.*, org.codehaus.stax2.ri.typed.AsciiValueEncoder, com.fasterxml.aalto.impl.ErrorConsts

Concrete implementation of StreamWriterBase, which implements basic namespace-aware, non repairing functionality.

Field Summary

Inherited from com.fasterxml.aalto.out.StreamWriterBase:
_cfgCDataAsText_cfgCheckAttrs_cfgCheckContent_cfgCheckStructure_config_currElem_dtdRootElemName_outputElemPool_poolSize_rootNsContext_state_stateAnyOutput_stateEmptyElement_stateStartElementOpen_symbols_validator_valueEncoderFactory_vldContent_vldProblemHandler_xmlWriterMAX_POOL_SIZE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected String
public void
public void
setDefaultNamespace(String
the uri to bind to the default namespace, may be null
uri
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.setDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair.
public void
writeAttribute(String
the uri of the prefix for this attribute
nsURI
,
String
the local name of the attribute
localName
,
String
the value of the attribute
value
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream
public void
writeAttribute(String
the prefix for this attribute
prefix
,
String
the uri of the prefix for this attribute
nsURI
,
String
the local name of the attribute
localName
,
String
the value of the attribute
value
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream
public void
writeDefaultNamespace(String
the uri to bind the default namespace to
nsURI
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream
public void
writeEmptyElement(String
the uri to bind the tag to, may not be null
nsURI
,
String
local name of the tag, may not be null
localName
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

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

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

Writes an empty element tag to the output
public void
writeNamespace(String
the prefix to bind this namespace to
prefix
,
String
the uri to bind the prefix to
nsURI
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace
public void
writeStartElement(String
the namespaceURI of the prefix to use, may not be null
nsURI
,
String
local name of the tag, may not be null
localName
)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

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

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

Writes a start tag to the output
public void
writeTypedAttribute(String prefix, String nsURI, String localName, AsciiValueEncoder enc)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeTypedAttribute.

Need to leave implementation of this method abstract, because repairing and non-repairing modes differ in how names are handled.
Inherited from com.fasterxml.aalto.out.StreamWriterBase:
_closeStartElement_reportInvalidContent_reportNwfAttr_reportNwfAttr_reportNwfContent_reportNwfContent_reportNwfName_reportNwfStructure_reportNwfStructure_reportValidationProblem_verifyRootElement_verifyStartElement_verifyWriteAttr_verifyWriteCData_verifyWriteDTD_writeAttribute_writeAttribute_writeDefaultNamespace_writeNamespace_writeStartDocument_writeStartTag_writeStartTagaddDefaultAttributeclosecloseCompletelyfindAttributeIndexflushgetAttributeCountgetAttributeLocalNamegetAttributeNamespacegetAttributePrefixgetAttributeTypegetAttributeValuegetAttributeValuegetBaseUrigetCurrentElementNamegetEncodinggetLocationgetNamespaceContextgetNamespaceURIgetPrefixgetPrefixesgetPropertygetValidationLocationgetXmlVersioninPrologOrEpilogisNotationDeclaredisPropertySupportedisUnparsedEntityDeclaredreportIllegalArgreportIllegalMethodreportProblemsetNamespaceContextsetPrefixsetPropertysetValidationProblemHandlerstopValidatingAgainststopValidatingAgainstthrowFromIOEthrowOutputErrorthrowOutputErrortoStringvalidateAgainstvalueEncoderFactorywriteAttributewriteBinarywriteBinarywriteBinaryAttributewriteBinaryAttributewriteBooleanwriteBooleanAttributewriteCDatawriteCDatawriteCharacterswriteCharacterswriteCommentwriteDecimalwriteDecimalAttributewriteDoublewriteDoubleArraywriteDoubleArrayAttributewriteDoubleAttributewriteDTDwriteDTDwriteDTDwriteEmptyElementwriteEndDocumentwriteEndElementwriteEntityRefwriteFloatwriteFloatArraywriteFloatArrayAttributewriteFloatAttributewriteFullEndElementwriteIntwriteIntArraywriteIntArrayAttributewriteIntAttributewriteIntegerwriteIntegerAttributewriteLongwriteLongArraywriteLongArrayAttributewriteLongAttributewriteProcessingInstructionwriteProcessingInstructionwriteQNamewriteQNameAttributewriteRawwriteRawwriteRawwriteSpacewriteSpacewriteStartDocumentwriteStartDocumentwriteStartDocumentwriteStartDocumentwriteStartElement

Constructor Detail

NonRepairingStreamWriterback to summary
public NonRepairingStreamWriter(WriterConfig cfg, XmlWriter writer, WNameTable symbols)

Method Detail

_serializeQNameback to summary
protected String _serializeQName(QName name)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase._serializeQName.

Annotations
@Override
_setPrefixback to summary
public void _setPrefix(String prefix, String uri)

Implements abstract com.fasterxml.aalto.out.StreamWriterBase._setPrefix.

Annotations
@Override
setDefaultNamespaceback to summary
public void setDefaultNamespace(String uri) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.setDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.setDefaultNamespace.

Binds a URI to the default namespace This URI is bound in the scope of the current START_ELEMENT / END_ELEMENT pair. If this method is called before a START_ELEMENT has been written the uri is bound in the root scope.

Parameters
uri:String

the uri to bind to the default namespace, may be null

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeAttributeback to summary
public void writeAttribute(String nsURI, String localName, String value) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
nsURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeAttributeback to summary
public void writeAttribute(String prefix, String nsURI, String localName, String value) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeAttribute.

Implements javax.xml.stream.XMLStreamWriter.writeAttribute.

Doc from javax.xml.stream.XMLStreamWriter.writeAttribute.

Writes an attribute to the output stream

Parameters
prefix:String

the prefix for this attribute

nsURI:String

the uri of the prefix for this attribute

localName:String

the local name of the attribute

value:String

the value of the attribute

Annotations
@Override
Exceptions
XMLStreamException:
if the namespace URI has not been bound to a prefix and javax.xml.stream.isRepairingNamespaces has not been set to true
writeDefaultNamespaceback to summary
public void writeDefaultNamespace(String nsURI) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeDefaultNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeDefaultNamespace.

Writes the default namespace to the stream

Parameters
nsURI:String

the uri to bind the default namespace to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeEmptyElementback to summary
public void writeEmptyElement(String nsURI, String localName) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeEmptyElement.

Implements javax.xml.stream.XMLStreamWriter.writeEmptyElement.

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

Writes an empty element tag to the output

Parameters
nsURI:String

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

localName:String

local name of the tag, may not be null

Annotations
@Override
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 prefix, String localName, String nsURI) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeEmptyElement.

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

localName:String

local name of the tag, may not be null

nsURI:String

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

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeNamespaceback to summary
public void writeNamespace(String prefix, String nsURI) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeNamespace.

Implements javax.xml.stream.XMLStreamWriter.writeNamespace.

Doc from javax.xml.stream.XMLStreamWriter.writeNamespace.

Writes a namespace to the output stream If the prefix argument to this method is the empty string, "xmlns", or null this method will delegate to writeDefaultNamespace

Parameters
prefix:String

the prefix to bind this namespace to

nsURI:String

the uri to bind the prefix to

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeStartElementback to summary
public void writeStartElement(String nsURI, String localName) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

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

Writes a start tag to the output

Parameters
nsURI:String

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

localName:String

local name of the tag, may not be null

Annotations
@Override
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 prefix, String localName, String nsURI) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeStartElement.

Implements javax.xml.stream.XMLStreamWriter.writeStartElement.

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

Writes a start tag to the output

Parameters
prefix:String

the prefix of the tag, may not be null

localName:String

local name of the tag, may not be null

nsURI:String

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

Annotations
@Override
Exceptions
XMLStreamException:
if an error occurs
writeTypedAttributeback to summary
public void writeTypedAttribute(String prefix, String nsURI, String localName, AsciiValueEncoder enc) throws XMLStreamException

Implements abstract com.fasterxml.aalto.out.StreamWriterBase.writeTypedAttribute.

Doc from com.fasterxml.aalto.out.StreamWriterBase.writeTypedAttribute.

Need to leave implementation of this method abstract, because repairing and non-repairing modes differ in how names are handled.

Annotations
@Override