Package org.rrd4j.core
Class XmlWriter
java.lang.Object
org.rrd4j.core.XmlWriter
- All Implemented Interfaces:
AutoCloseable
Extremely simple utility class used to create XML documents.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionXmlWriter(OutputStream stream) Creates XmlWriter with the specified output stream to send XML code to.XmlWriter(OutputStream stream, boolean autoFlush) Creates XmlWriter with the specified output stream to send XML code to. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcloseTag()Closes the corresponding XML tagvoidflush()Flushes the output streamvoidOpens XML tagvoidwriteComment(Object comment) Writes XML comment to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output streamvoidWrites <tag>value</tag> to output stream
-
Field Details
-
INDENT_STR
- See Also:
-
-
Constructor Details
-
XmlWriter
Creates XmlWriter with the specified output stream to send XML code to.- Parameters:
stream- Output stream which receives XML code
-
XmlWriter
Creates XmlWriter with the specified output stream to send XML code to.- Parameters:
stream- Output stream which receives XML codeautoFlush- is the stream to be flushed automatically
-
-
Method Details
-
startTag
Opens XML tag- Parameters:
tag- XML tag name
-
closeTag
public void closeTag()Closes the corresponding XML tag -
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>nanString- aStringobject.
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
writeTag
Writes <tag>value</tag> to output stream- Parameters:
tag- XML tag namevalue- value to be placed between<tag>and</tag>
-
flush
public void flush()Flushes the output stream -
writeComment
Writes XML comment to output stream- Parameters:
comment- comment string
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-