Package repast.simphony.data2
Class FileDataSink
java.lang.Object
repast.simphony.data2.FileDataSink
- All Implemented Interfaces:
DataSink
DataSink that writes data to a file in tabular format.
- Author:
- Nick Collier
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppends the specified data to this sink.voidclose()Close this DataSink.voidflush()Flushes any data buffered by this DataSink.getFile()Gets the file this FileDataSink will write to.Gets the format type for this FileDataSink.Gets the formatter used to format the data written using this FileDataSink.getName()Gets the name of this FileDataSink.voidOpen this DataSink.voidNotified this DataSink that the current record has ended.voidrowEnded()Notifies this DataSink that the last append was end of a "row."voidNotifies this DataSink that the next append is that start of a "row." of data.
-
Constructor Details
-
FileDataSink
-
-
Method Details
-
getFile
Gets the file this FileDataSink will write to.- Returns:
- the file this FileDataSink will write to.
-
getName
Gets the name of this FileDataSink.- Returns:
- the name of this FileDataSink.
-
getFormatter
Gets the formatter used to format the data written using this FileDataSink.- Returns:
- the formatter used to format the data written using this FileDataSink.
-
getFormat
Gets the format type for this FileDataSink.- Returns:
- the format type for this FileDataSink.
-
open
Description copied from interface:DataSinkOpen this DataSink. -
flush
public void flush()Description copied from interface:DataSinkFlushes any data buffered by this DataSink. -
rowStarted
public void rowStarted()Description copied from interface:DataSinkNotifies this DataSink that the next append is that start of a "row." of data.- Specified by:
rowStartedin interfaceDataSink
-
append
Description copied from interface:DataSinkAppends the specified data to this sink. The key can be, for example, a column name and the value the current value for that column. -
rowEnded
public void rowEnded()Description copied from interface:DataSinkNotifies this DataSink that the last append was end of a "row." -
recordEnded
public void recordEnded()Description copied from interface:DataSinkNotified this DataSink that the current record has ended.- Specified by:
recordEndedin interfaceDataSink
-
close
public void close()Description copied from interface:DataSinkClose this DataSink.
-