public class StorableResultSaver extends Object implements ResultSaver<StorableResult>
ResultSaver
for StorableResult
. StorableResult
are stored to files as their XML representation
using Storable.toXML()
of the contained Storable
object. This object is obtained from the StorableResult.getResultInstance()
method.Modifier and Type | Method and Description |
---|---|
String[] |
getFileExtensions(StorableResult 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(StorableResult result,
File path)
Writes the output (i.e., the result contents) to the supplied file.
|
boolean |
writeOutput(StorableResult 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<StorableResult>
ResultSaver
is for storing atomic Result
s.public String[] getFileExtensions(StorableResult result)
ResultSaver
Result
getFileExtensions
in interface ResultSaver<StorableResult>
result
- the resultpublic boolean writeOutput(StorableResult result, File path)
ResultSaver
writeOutput
in interface ResultSaver<StorableResult>
result
- the resultpath
- the output filepublic boolean writeOutput(StorableResult result, StringBuffer buf)
ResultSaver
StringBuffer
writeOutput
in interface ResultSaver<StorableResult>
result
- the resultbuf
- the buffer