|
SSJ
3.3.1
Stochastic Simulation in Java
|
This package provides tools for exporting data to text and binary files, as well as for importing data from files. More...
Classes | |
| class | AbstractDataReader |
| This abstract class implements shared functionality for data readers. More... | |
| class | AbstractDataWriter |
| This abstract class implements shared functionality for data writers. More... | |
| class | BinaryDataReader |
| Binary data reader. More... | |
| class | BinaryDataWriter |
| Binary data writer. More... | |
| class | CachedDataWriter |
| This abstract class implements shared functionality for data writers that store all fields in memory before outputing them with umontreal.ssj.util.io.DataWriter.close. More... | |
| class | DataField |
| This class represents a data field from a file read by an instance of a class implementing DataReader. More... | |
| interface | DataReader |
| Data reader interface. More... | |
| interface | DataWriter |
| Data writer interface. More... | |
| class | TextDataWriter |
| Text data writer. More... | |
This package provides tools for exporting data to text and binary files, as well as for importing data from files.
Each of the write() methods takes a field label as their first argument. This label can always be set to null, in which case an anonymous field will be written. The write() methods that take one-dimensional array argument can also take an additional integer argument, for convenience, to specify the number of elements to write in the array.
For a quick start, consult the following examples and the documentation for umontreal.ssj.util.io.DataWriter and umontreal.ssj.util.io.DataReader, as well as the constructors of implementing classes ( umontreal.ssj.util.io.TextDataWriter, umontreal.ssj.util.io.BinaryDataWriter and umontreal.ssj.util.io.BinaryDataReader ).
Example of how to write data to a file:
Example of how to read data from a file — specific fields:
Example of how to read data from a file — list all fields:
1.8.14