T - the type of the Results that can be savedpublic interface ResultSaver<T extends Result>
Results to a file.
Specific implementations for different Result types required.
Each implementation must register using ResultSaverLibrary.register(Class, ResultSaver) to become available
in other classes.| Modifier and Type | Method and Description |
|---|---|
String[] |
getFileExtensions(T result)
Returns the file extensions (in descending preference) for storing the given
Result |
boolean |
isAtomic()
|
boolean |
writeOutput(T result,
File path)
Writes the output (i.e., the result contents) to the supplied file.
|
boolean |
writeOutput(T result,
StringBuffer buf)
Appends the output (i.e., the result contents) to the supplied
StringBuffer |
boolean isAtomic()
ResultSaver is for storing atomic Results.String[] getFileExtensions(T result)
Resultresult - the resultboolean writeOutput(T result, File path)
result - the resultpath - the output fileboolean writeOutput(T result, StringBuffer buf)
StringBufferresult - the resultbuf - the buffer