Package org.serviceconnector.util
Class XMLDumpWriter
java.lang.Object
org.serviceconnector.util.XMLDumpWriter
The Class XMLDumpWriter is a wrapper for XMLStreamWriter.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidwrite the end tag to the document and flush it.voidStarts new document. writes the encoding, sc version and current timestampvoidwriteAttribute(String attributeName, double value) Write double attribute value converting it to stringvoidwriteAttribute(String attributeName, int value) Write int attribute value converting it to string.voidwriteAttribute(String attributeName, Boolean value) Write boolean attribute value converting it to string.voidwriteAttribute(String attributeName, Long value) Write long attribute value converting it to string.voidwriteAttribute(String attributeName, String value) Write string attribute value.voidwriteComment(String comment) Write comment.voidwriteElement(String name, boolean value) Write element converting boolean value to String.voidwriteElement(String name, double value) Write element converting double value to String.voidwriteElement(String name, int value) Write element converting int value to String.voidwriteElement(String name, long value) Write element converting long value to String.voidwriteElement(String name, String value) Write element.voidCloses the actual element.voidwriteStartElement(String value) Starts a new element.
-
Constructor Details
-
XMLDumpWriter
Instantiates a new XML dump writer.- Parameters:
fos- the fos- Throws:
XMLStreamException- the xML stream exception
-
-
Method Details
-
startDocument
Starts new document. writes the encoding, sc version and current timestamp- Throws:
XMLStreamException- the xML stream exception
-
writeComment
Write comment.- Parameters:
comment- the comment- Throws:
XMLStreamException- the xML stream exception
-
endDocument
write the end tag to the document and flush it.- Throws:
XMLStreamException- the xML stream exception
-
writeStartElement
Starts a new element.- Parameters:
value- the value- Throws:
XMLStreamException- the xML stream exception
-
writeEndElement
Closes the actual element.- Throws:
XMLStreamException- the xML stream exception
-
writeElement
Write element.- Parameters:
name- the namevalue- the value- Throws:
XMLStreamException- the xML stream exception
-
writeElement
Write element converting int value to String.- Parameters:
name- the namevalue- the int value- Throws:
XMLStreamException- the xML stream exception
-
writeElement
Write element converting long value to String.- Parameters:
name- the namevalue- the long value- Throws:
XMLStreamException- the xML stream exception
-
writeElement
Write element converting double value to String.- Parameters:
name- the namevalue- the double value- Throws:
XMLStreamException- the xML stream exception
-
writeElement
Write element converting boolean value to String.- Parameters:
name- the namevalue- the value- Throws:
XMLStreamException- the xML stream exception
-
writeAttribute
Write string attribute value.- Parameters:
attributeName- the name of the attributevalue- the attribute value- Throws:
XMLStreamException- the xML stream exception
-
writeAttribute
Write boolean attribute value converting it to string.- Parameters:
attributeName- the name of the attributevalue- the attribute value- Throws:
XMLStreamException- the xML stream exception
-
writeAttribute
Write int attribute value converting it to string.- Parameters:
attributeName- the name of the attributevalue- the attribute value- Throws:
XMLStreamException- the xML stream exception
-
writeAttribute
Write long attribute value converting it to string.- Parameters:
attributeName- the name of the attributevalue- the attribute value- Throws:
XMLStreamException- the xML stream exception
-
writeAttribute
Write double attribute value converting it to string- Parameters:
attributeName- the name of the attributevalue- the attribute value- Throws:
XMLStreamException- the xML stream exception
-