Package adams.data.io.input
Interface FlowReader
-
- All Superinterfaces:
Destroyable
,FileFormatHandler
,OptionHandler
- All Known Subinterfaces:
NestedFlowReader
- All Known Implementing Classes:
AbstractFlowReader
,AbstractNestedFlowReader
,DefaultFlowReader
,JsonFlowReader
public interface FlowReader extends OptionHandler, FileFormatHandler
Interface for flow readers.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description FlowWriter
getCorrespondingWriter()
Returns the corresponding writer, if available.MessageCollection
getErrors()
Returns any errors that were encountered while reading.MessageCollection
getWarnings()
Returns any warnings that were encountered while reading.Actor
readActor(File file)
Reads the flow from the specified file.Actor
readActor(InputStream stream)
Reads the flow from the stream.Actor
readActor(Reader r)
Reads the flow from the given reader.Actor
readActor(String filename)
Reads the flow from 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
-
readActor
Actor readActor(File file)
Reads the flow from the specified file.- Parameters:
file
- the file to read from- Returns:
- null in case of an error, otherwise the flow
-
readActor
Actor readActor(String filename)
Reads the flow from the given file.- Parameters:
filename
- the file to read from- Returns:
- the flow or null in case of an error
-
readActor
Actor readActor(InputStream stream)
Reads the flow from the stream. The caller must ensure to close the stream.- Parameters:
stream
- the stream to read from- Returns:
- the flow or null in case of an error
-
readActor
Actor readActor(Reader r)
Reads the flow from the given reader. The caller must ensure to close the reader.- Parameters:
r
- the reader to read from- Returns:
- the flow or null in case of an error
-
getWarnings
MessageCollection getWarnings()
Returns any warnings that were encountered while reading.- Returns:
- the warnings
-
getErrors
MessageCollection getErrors()
Returns any errors that were encountered while reading.- Returns:
- the errors
-
getCorrespondingWriter
FlowWriter getCorrespondingWriter()
Returns the corresponding writer, if available.- Returns:
- the writer, null if none available
-
-