public class PrettyPrintXMLStreamWriter extends Object implements XMLStreamWriter
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_INDENT_SIZE |
static String |
DEFAULT_NEW_LINE |
| Constructor and Description |
|---|
PrettyPrintXMLStreamWriter(XMLStreamWriter writer) |
PrettyPrintXMLStreamWriter(XMLStreamWriter writer,
int indentSize) |
PrettyPrintXMLStreamWriter(XMLStreamWriter writer,
int indentSize,
String newLine) |
public static final int DEFAULT_INDENT_SIZE
public static final String DEFAULT_NEW_LINE
public PrettyPrintXMLStreamWriter(XMLStreamWriter writer)
public PrettyPrintXMLStreamWriter(XMLStreamWriter writer, int indentSize)
public PrettyPrintXMLStreamWriter(XMLStreamWriter writer, int indentSize, String newLine)
public int getIndentSize()
public void writeStartElement(String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(String namespaceURI, String localName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String namespaceURI, String localName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String prefix, String localName, String namespaceURI) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndElement()
throws XMLStreamException
writeEndElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndDocument()
throws XMLStreamException
writeEndDocument in interface XMLStreamWriterXMLStreamExceptionpublic void close()
throws XMLStreamException
close in interface XMLStreamWriterXMLStreamExceptionpublic void flush()
throws XMLStreamException
flush in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String prefix, String namespaceURI, String localName, String value) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeNamespace(String prefix, String namespaceURI) throws XMLStreamException
writeNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeDefaultNamespace(String namespaceURI) throws XMLStreamException
writeDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeComment(String data) throws XMLStreamException
writeComment in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(String target, String data) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeCData(String data) throws XMLStreamException
writeCData in interface XMLStreamWriterXMLStreamExceptionpublic void writeDTD(String dtd) throws XMLStreamException
writeDTD in interface XMLStreamWriterXMLStreamExceptionpublic void writeEntityRef(String name) throws XMLStreamException
writeEntityRef in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument()
throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(String encoding, String version) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(String text) throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(char[] text,
int start,
int len)
throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic String getPrefix(String uri) throws XMLStreamException
getPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setPrefix(String prefix, String uri) throws XMLStreamException
setPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setDefaultNamespace(String uri) throws XMLStreamException
setDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void setNamespaceContext(NamespaceContext namespaceContext) throws XMLStreamException
setNamespaceContext in interface XMLStreamWriterXMLStreamExceptionpublic NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLStreamWriterpublic Object getProperty(String name) throws IllegalArgumentException
getProperty in interface XMLStreamWriterIllegalArgumentExceptionprotected void beforeStartDocument()
throws XMLStreamException
XMLStreamExceptionprotected void afterStartDocument()
throws XMLStreamException
XMLStreamExceptionprotected void beforeEndDocument()
throws XMLStreamException
XMLStreamExceptionprotected void afterEndDocument()
throws XMLStreamException
XMLStreamExceptionprotected void beforeStartElement(String localName, String namespaceURI) throws XMLStreamException
XMLStreamExceptionprotected void afterStartElement(String localName, String namespaceURI) throws XMLStreamException
XMLStreamExceptionprotected void beforeEndElement()
throws XMLStreamException
XMLStreamExceptionprotected void afterEndElement()
throws XMLStreamException
XMLStreamExceptionprotected void writeIndent()
throws XMLStreamException
XMLStreamExceptionprotected void writeAndIncreaseIndent()
throws XMLStreamException
XMLStreamExceptionprotected void indent()
protected void unindent()
Copyright © 2007–2021. All rights reserved.