public class SafeXMLStreamWriter extends Object implements XMLStreamWriter, AutoCloseable
| Constructor and Description |
|---|
SafeXMLStreamWriter(XMLEmitter aEmitter) |
public SafeXMLStreamWriter(@Nonnull XMLEmitter aEmitter)
public static boolean isDefaultDebugMode()
public static void setDefaultDebugMode(boolean bDefaultDebugMode)
public final boolean isDebugMode()
true if debug mode is enabled, false if
it is disabled. By default it is disabled.setDebugMode(boolean)@Nonnull public final SafeXMLStreamWriter setDebugMode(boolean bDebugMode)
bDebugMode - true to enable debug mode, false to
disable it.isDebugMode()public void writeStartDocument()
throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(@Nullable String sVersion) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(@Nonnull String sEncoding, @Nullable String sVersion) throws XMLStreamException
writeStartDocument in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartDocument(@Nonnull Charset aEncoding, @Nonnull EXMLVersion eVersion)
public void writeDTD(@Nonnull String sDTD) throws XMLStreamException
writeDTD in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(String sLocalName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(@Nullable String sNamespaceURI, String sLocalName) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeStartElement(@Nullable String sPrefix, String sLocalName, @Nullable String sNamespaceURI) throws XMLStreamException
writeStartElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(String sLocalName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(@Nullable String sNamespaceURI, String sLocalName) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeEmptyElement(@Nullable String sPrefix, String sLocalName, @Nullable String sNamespaceURI) throws XMLStreamException
writeEmptyElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(String sLocalName, String sValue) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(@Nullable String sNamespaceURI, String sLocalName, String sValue) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeAttribute(@Nullable String sPrefix, @Nullable String sNamespaceURI, String sLocalName, String sValue) throws XMLStreamException
writeAttribute in interface XMLStreamWriterXMLStreamExceptionpublic void writeNamespace(@Nullable String sPrefix, @Nonnull String sNamespaceURI) throws XMLStreamException
writeNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeDefaultNamespace(@Nonnull String sNamespaceURI) throws XMLStreamException
writeDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndElement()
throws XMLStreamException
writeEndElement in interface XMLStreamWriterXMLStreamExceptionpublic void writeComment(String sData) throws XMLStreamException
writeComment in interface XMLStreamWriterXMLStreamExceptionpublic void writeCData(String sData) throws XMLStreamException
writeCData in interface XMLStreamWriterXMLStreamExceptionpublic void writeEntityRef(String sName) throws XMLStreamException
writeEntityRef in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(String sText) throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeCharacters(char[] aText,
int nStart,
int nLen)
throws XMLStreamException
writeCharacters in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(@Nonnull String sTarget) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeProcessingInstruction(@Nonnull String sTarget, @Nullable String sData) throws XMLStreamException
writeProcessingInstruction in interface XMLStreamWriterXMLStreamExceptionpublic void writeEndDocument()
throws XMLStreamException
writeEndDocument in interface XMLStreamWriterXMLStreamExceptionpublic void flush()
throws XMLStreamException
flush in interface XMLStreamWriterXMLStreamExceptionpublic void close()
throws XMLStreamException
close in interface AutoCloseableclose in interface XMLStreamWriterXMLStreamExceptionpublic String getPrefix(@Nonnull String sUri) throws XMLStreamException
getPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setPrefix(@Nonnull String sPrefix, @Nonnull String sUri) throws XMLStreamException
setPrefix in interface XMLStreamWriterXMLStreamExceptionpublic void setDefaultNamespace(@Nonnull String sUri) throws XMLStreamException
setDefaultNamespace in interface XMLStreamWriterXMLStreamExceptionpublic void setNamespaceContext(@Nullable NamespaceContext aContext) throws XMLStreamException
setNamespaceContext in interface XMLStreamWriterXMLStreamException@Nonnull public NamespaceContext getNamespaceContext()
getNamespaceContext in interface XMLStreamWriter@Nullable public Object getProperty(String sName)
getProperty in interface XMLStreamWriter@Nonnull public static SafeXMLStreamWriter create(@Nonnull @WillCloseWhenClosed Writer aWriter, @Nonnull IXMLWriterSettings aSettings)
@Nonnull public static SafeXMLStreamWriter create(@Nonnull @WillCloseWhenClosed OutputStream aOS, @Nonnull IXMLWriterSettings aSettings)
Copyright © 2014–2023 Philip Helger. All rights reserved.