SSJ
3.3.1
Stochastic Simulation in Java
|
Data reader interface. More...
Public Member Functions | |
Reading atomic data | |
String | readString (String label) throws IOException |
Reads the first field labeled as label and returns its String value. | |
int | readInt (String label) throws IOException |
Reads the first field labeled as label and returns its int value. | |
float | readFloat (String label) throws IOException |
Reads the first field labeled as label and returns its float value. | |
double | readDouble (String label) throws IOException |
Reads the first field labeled as label and returns its double value. | |
Reading one-dimensional arrays | |
String [] | readStringArray (String label) throws IOException |
Reads the first field labeled as label and returns its value as a one-dimensional array of String ’s. | |
int [] | readIntArray (String label) throws IOException |
Reads the first field labeled as label and returns its value as a one-dimensional array of int ’s. | |
float [] | readFloatArray (String label) throws IOException |
Reads the first field labeled as label and returns its value as a one-dimensional array of float ’s. | |
double [] | readDoubleArray (String label) throws IOException |
Reads the first field labeled as label and returns its value as a one-dimensional array of double ’s. | |
Reading two-dimensional arrays | |
String [][] | readStringArray2D (String label) throws IOException |
Reads the first field labeled as label and returns its value as a two-dimensional array of String ’s. | |
int [][] | readIntArray2D (String label) throws IOException |
Reads the first field labeled as label and returns its value as a two-dimensional array of int ’s. | |
float [][] | readFloatArray2D (String label) throws IOException |
Reads the first field labeled as label and returns its value as a two-dimensional array of float ’s. | |
double [][] | readDoubleArray2D (String label) throws IOException |
Reads the first field labeled as label and returns its value as a two-dimensional array of double ’s. | |
Reading fields of unknown type | |
Map< String, DataField > | readAllNextFields () throws IOException |
Reads all remaining fields in the file and returns a hashmap indexed by field labels. More... | |
Map< String, DataField > | readAllFields () throws IOException |
Reads all fields in the file and returns a hashmap indexed by field labels. More... | |
DataField | readNextField () throws IOException |
Reads the next available field. More... | |
DataField | readField (String label) throws IOException |
Reads the first field labeled as label . More... | |
Other methods | |
void | close () throws IOException |
Closes the input stream. | |
void | reset () throws IOException |
Resets the reader to its initial state, i.e. More... | |
boolean | dataPending () throws IOException |
Returns true if there remains data to be read. | |
Data reader interface.
Map<String, DataField> readAllFields | ( | ) | throws IOException |
Reads all fields in the file and returns a hashmap indexed by field labels.
Anonymous fields are mapped to "_data01_"
, "_data02_"
, …
Implemented in AbstractDataReader.
Map<String, DataField> readAllNextFields | ( | ) | throws IOException |
Reads all remaining fields in the file and returns a hashmap indexed by field labels.
Anonymous fields are mapped to "_data01_"
, "_data02_"
, …
Implemented in AbstractDataReader.
DataField readField | ( | String | label | ) | throws IOException |
Reads the first field labeled as label
.
null
if not found Implemented in BinaryDataReader.
DataField readNextField | ( | ) | throws IOException |
Reads the next available field.
null
if not found Implemented in BinaryDataReader.
void reset | ( | ) | throws IOException |
Resets the reader to its initial state, i.e.
goes back to the beginning of the data stream, if possible.
Implemented in BinaryDataReader.