Class FormattingXmlStreamWriter
- java.lang.Object
- 
- org.apache.jackrabbit.vault.util.xml.serialize.FormattingXmlStreamWriter
 
- 
- All Implemented Interfaces:
- AutoCloseable,- XMLStreamWriter
 
 public class FormattingXmlStreamWriter extends Object implements XMLStreamWriter, AutoCloseable StAX XML Stream Writer filter. Adds the following functionality:- optional line break before each attribute
- new line at end
- indentation for elements and comments
 
- 
- 
Method Summary
 
- 
- 
- 
Method Detail- 
createpublic static FormattingXmlStreamWriter create(OutputStream output, OutputFormat format) throws XMLStreamException, FactoryConfigurationError 
 - 
writeEndDocumentpublic void writeEndDocument() throws XMLStreamException- Specified by:
- writeEndDocumentin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartElementpublic void writeStartElement(String localName) throws XMLStreamException - Specified by:
- writeStartElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartElementpublic void writeStartElement(String namespaceURI, String localName) throws XMLStreamException - Specified by:
- writeStartElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartElementpublic void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException - Specified by:
- writeStartElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeEndElementpublic void writeEndElement() throws XMLStreamException- Specified by:
- writeEndElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeNamespacepublic void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException - Specified by:
- writeNamespacein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeAttributepublic void writeAttribute(String localName, String value) throws XMLStreamException - Specified by:
- writeAttributein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeAttributepublic void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException - Specified by:
- writeAttributein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeAttributepublic void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException - Specified by:
- writeAttributein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeCommentpublic void writeComment(String data) throws XMLStreamException - Specified by:
- writeCommentin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
closepublic void close() throws XMLStreamException- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
setIndentSteppublic void setIndentStep(String s) 
 - 
flushpublic void flush() throws XMLStreamException- Specified by:
- flushin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeDefaultNamespacepublic void writeDefaultNamespace(String namespaceURI) throws XMLStreamException - Specified by:
- writeDefaultNamespacein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeProcessingInstructionpublic void writeProcessingInstruction(String target) throws XMLStreamException - Specified by:
- writeProcessingInstructionin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeProcessingInstructionpublic void writeProcessingInstruction(String target, String data) throws XMLStreamException - Specified by:
- writeProcessingInstructionin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartDocumentpublic void writeStartDocument() throws XMLStreamException- Specified by:
- writeStartDocumentin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartDocumentpublic void writeStartDocument(String version) throws XMLStreamException - Specified by:
- writeStartDocumentin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeDTDpublic void writeDTD(String dtd) throws XMLStreamException - Specified by:
- writeDTDin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeStartDocumentpublic void writeStartDocument(String encoding, String version) throws XMLStreamException - Specified by:
- writeStartDocumentin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeEntityRefpublic void writeEntityRef(String name) throws XMLStreamException - Specified by:
- writeEntityRefin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeEmptyElementpublic void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException - Specified by:
- writeEmptyElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
getPrefixpublic String getPrefix(String uri) throws XMLStreamException - Specified by:
- getPrefixin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
setPrefixpublic void setPrefix(String prefix, String uri) throws XMLStreamException - Specified by:
- setPrefixin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeEmptyElementpublic void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException - Specified by:
- writeEmptyElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
setDefaultNamespacepublic void setDefaultNamespace(String uri) throws XMLStreamException - Specified by:
- setDefaultNamespacein interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeEmptyElementpublic void writeEmptyElement(String localName) throws XMLStreamException - Specified by:
- writeEmptyElementin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
setNamespaceContextpublic void setNamespaceContext(NamespaceContext context) throws XMLStreamException - Specified by:
- setNamespaceContextin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
getNamespaceContextpublic NamespaceContext getNamespaceContext() - Specified by:
- getNamespaceContextin interface- XMLStreamWriter
 
 - 
getPropertypublic Object getProperty(String name) throws IllegalArgumentException - Specified by:
- getPropertyin interface- XMLStreamWriter
- Throws:
- IllegalArgumentException
 
 - 
writeCharacterspublic void writeCharacters(String text) throws XMLStreamException - Specified by:
- writeCharactersin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeCharacterspublic void writeCharacters(char[] text, int start, int len) throws XMLStreamException- Specified by:
- writeCharactersin interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 - 
writeCDatapublic void writeCData(String data) throws XMLStreamException - Specified by:
- writeCDatain interface- XMLStreamWriter
- Throws:
- XMLStreamException
 
 
- 
 
-