public class PrintResultFilterWriter extends java.lang.Object implements PrintResultWriter
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PATH_DELIMITER |
Constructor and Description |
---|
PrintResultFilterWriter(ResultWriter writer) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the writer and underlying streams.
|
void |
writeDouble(ResultKeyword keyword,
double value)
Writes an double result for the given keyword.
|
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(ResultKeyword keyword,
long value)
Writes an long integer result for the given keyword.
|
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(ResultKeyword keyword,
java.lang.String value)
Writes an string result for the given keyword.
|
void |
writeString(java.lang.String name,
java.lang.String value)
A shorthand method for
|
public PrintResultFilterWriter(ResultWriter writer)
public void close() throws ResultException
ResultWriter
close
in interface ResultWriter
ResultException
public void writeDouble(ResultKeyword keyword, double value) throws ResultException
PrintResultWriter
writeDouble
in interface PrintResultWriter
keyword
- the print keyword which is used for the name and formattingvalue
- the result valueResultException
public void writeLong(ResultKeyword keyword, long value) throws ResultException
PrintResultWriter
writeLong
in interface PrintResultWriter
keyword
- the print keyword which is used for the name and formattingvalue
- the result valueResultException
public void writeString(ResultKeyword keyword, java.lang.String value) throws ResultException
PrintResultWriter
writeString
in interface PrintResultWriter
keyword
- the print keyword which is used for the name and formattingvalue
- the result valueResultException
public void writeDouble(java.lang.String name, double value) throws ResultException
ResultWriter
<code> writeDouble(value); writeName(name); </code>
writeDouble
in interface ResultWriter
name
- name of the resultvalue
- value of the resultResultException
- 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 ResultWriter
name
- name of the resultvalue
- value of the resultResultException
- 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 ResultWriter
name
- name of the resultvalue
- value of the resultResultException
- if any error in writing the results occurspublic void writeStartArray(java.lang.String name) throws ResultException
ResultWriter
writeEndArray
.writeStartArray
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeEndArray() throws ResultException
ResultWriter
writeStartArray
.writeEndArray
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeStartArrayItem(int index) throws ResultException
ResultWriter
writeEndBucket
. It is only legal to call this method in an array.writeStartArrayItem
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeEndArrayItem() throws ResultException
ResultWriter
writeStartBucket
.writeEndArrayItem
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeStartNode(java.lang.String type, java.lang.String name) throws ResultException
ResultWriter
writeEndNode
.writeStartNode
in interface ResultWriter
type
- of the result nodeResultException
- if any error in writing the results occurspublic void writeEndNode() throws ResultException
ResultWriter
writeStartNode
.writeEndNode
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeStartResults() throws ResultException
ResultWriter
writeEndResults
.writeStartResults
in interface ResultWriter
ResultException
- if any error in writing the results occurspublic void writeEndResults() throws ResultException
ResultWriter
writeStartResults
and all other
writeStartXXX
must have been matched by their
writeEndXXX
counterparts.writeEndResults
in interface ResultWriter
ResultException
- if any error in writing the results occurs