public class ListResultSaver extends Object implements ResultSaver<ListResult>
ResultSaver
for ListResult
s.
Contents are saved to a text file or StringBuffer
using the ListResult.print(PrintWriter)
method.Modifier and Type | Method and Description |
---|---|
String[] |
getFileExtensions(ListResult result)
Returns the file extensions (in descending preference) for storing the given
Result |
boolean |
isAtomic()
|
static void |
register()
Registers this
ResultSaver in the ResultSaverLibrary |
boolean |
writeOutput(ListResult result,
File path)
Writes the output (i.e., the result contents) to the supplied file.
|
boolean |
writeOutput(ListResult result,
StringBuffer buf)
Appends the output (i.e., the result contents) to the supplied
StringBuffer |
public static void register()
ResultSaver
in the ResultSaverLibrary
public boolean isAtomic()
ResultSaver
isAtomic
in interface ResultSaver<ListResult>
ResultSaver
is for storing atomic Result
s.public String[] getFileExtensions(ListResult result)
ResultSaver
Result
getFileExtensions
in interface ResultSaver<ListResult>
result
- the resultpublic boolean writeOutput(ListResult result, File path)
ResultSaver
writeOutput
in interface ResultSaver<ListResult>
result
- the resultpath
- the output filepublic boolean writeOutput(ListResult result, StringBuffer buf)
ResultSaver
StringBuffer
writeOutput
in interface ResultSaver<ListResult>
result
- the resultbuf
- the buffer