public class XMLResultWriter extends java.lang.Object implements ResultWriter
| Constructor and Description |
|---|
XMLResultWriter(java.io.OutputStream output,
ResultFileType resultType,
int seedIndex,
int batchNumber,
int totalNumberOfBatches)
Constructs a new XML result writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the writer and underlying streams.
|
void |
writeDouble(java.lang.String name,
double value)
A shorthand method for
|
void |
writeEndArray()
Writes the end of a result array.
|
void |
writeEndArrayItem()
Writes the end of a result array bucket.
|
void |
writeEndNode()
Writes the end of a result node.
|
void |
writeEndResults()
Writes the end of the results.
|
void |
writeLong(java.lang.String name,
long value)
A shorthand method for
|
void |
writeStartArray(java.lang.String name)
Writes the beginning of a result array.
|
void |
writeStartArrayItem(int index)
Writes the beginning of a result array bucket.
|
void |
writeStartNode(java.lang.String type,
java.lang.String name)
Writes the beginning of a result node.
|
void |
writeStartResults()
Writes the beginning of the results.
|
void |
writeString(java.lang.String name,
java.lang.String value)
A shorthand method for
|
public XMLResultWriter(java.io.OutputStream output,
ResultFileType resultType,
int seedIndex,
int batchNumber,
int totalNumberOfBatches)
output - the output stream for the XML result tree. The stream will not
be closed by this writerpublic void close()
throws ResultException
ResultWriterclose in interface ResultWriterResultExceptionpublic void writeStartResults()
throws ResultException
ResultWriterwriteEndResults
.writeStartResults in interface ResultWriterResultException - if any error in writing the results occurspublic void writeEndResults()
throws ResultException
ResultWriterwriteStartResults and all other
writeStartXXX must have been matched by their
writeEndXXX counterparts.writeEndResults in interface ResultWriterResultException - if any error in writing the results occurspublic void writeDouble(java.lang.String name,
double value)
throws ResultException
ResultWriter<code> writeDouble(value); writeName(name); </code>
writeDouble in interface ResultWritername - name of the resultvalue - value of the resultResultException - if any error in writing the results occurspublic void writeEndArray()
throws ResultException
ResultWriterwriteStartArray.writeEndArray in interface ResultWriterResultException - if any error in writing the results occurspublic void writeEndArrayItem()
throws ResultException
ResultWriterwriteStartBucket.writeEndArrayItem in interface ResultWriterResultException - if any error in writing the results occurspublic void writeEndNode()
throws ResultException
ResultWriterwriteStartNode.writeEndNode in interface ResultWriterResultException - if any error in writing the results occurspublic void writeLong(java.lang.String name,
long value)
throws ResultException
ResultWriter<code> writeLong(value); writeName(name); </code>
writeLong in interface ResultWritername - name of the resultvalue - value of the resultResultException - if any error in writing the results occurspublic void writeStartArray(java.lang.String name)
throws ResultException
ResultWriterwriteEndArray.writeStartArray in interface ResultWriterResultException - if any error in writing the results occurspublic void writeStartArrayItem(int index)
throws ResultException
ResultWriterwriteEndBucket. It is only legal to call this method in an array.writeStartArrayItem in interface ResultWriterResultException - if any error in writing the results occurspublic void writeStartNode(java.lang.String type,
java.lang.String name)
throws ResultException
ResultWriterwriteEndNode.writeStartNode in interface ResultWritertype - of the result nodeResultException - if any error in writing the results occurspublic void writeString(java.lang.String name,
java.lang.String value)
throws ResultException
ResultWriter<code> writeString(value); writeName(name); </code>
writeString in interface ResultWritername - name of the resultvalue - value of the resultResultException - if any error in writing the results occurs