Package adams.data.io.output
Interface FlowWriter
-
- All Superinterfaces:
Destroyable
,FileFormatHandler
,OptionHandler
- All Known Subinterfaces:
NestedFlowWriter
- All Known Implementing Classes:
AbstractFlowWriter
,AbstractNestedFlowWriter
,DefaultFlowWriter
,JsonFlowWriter
public interface FlowWriter extends OptionHandler, FileFormatHandler
Interface for flow writers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FlowReader
getCorrespondingReader()
Returns the corresponding reader, if available.boolean
write(Actor content, File file)
Writes the given content to the specified file.boolean
write(Actor content, OutputStream stream)
Writes the content to the given output stream.boolean
write(Actor content, Writer writer)
Writes the content to the given writer.boolean
write(Actor content, String filename)
Writes the content to the given file.-
Methods inherited from interface adams.core.Destroyable
destroy
-
Methods inherited from interface adams.core.io.FileFormatHandler
getDefaultFormatExtension, getFormatDescription, getFormatExtensions
-
Methods inherited from interface adams.core.option.OptionHandler
cleanUpOptions, defineOptions, getOptionManager, toCommandLine
-
-
-
-
Method Detail
-
write
boolean write(Actor content, File file)
Writes the given content to the specified file.- Parameters:
content
- the content to writefile
- the file to write to- Returns:
- true if successfully written
-
write
boolean write(Actor content, String filename)
Writes the content to the given file.- Parameters:
content
- the content to writefilename
- the file to write the content to- Returns:
- true if successfully written
-
write
boolean write(Actor content, OutputStream stream)
Writes the content to the given output stream. The caller must ensure that the stream gets closed.- Parameters:
content
- the content to writestream
- the output stream to write the content to- Returns:
- true if successfully written
-
write
boolean write(Actor content, Writer writer)
Writes the content to the given writer. The caller must ensure that the writer gets closed.- Parameters:
content
- the content to writewriter
- the writer to write the content to- Returns:
- true if successfully written
-
getCorrespondingReader
FlowReader getCorrespondingReader()
Returns the corresponding reader, if available.- Returns:
- the reader, null if none available
-
-