25package umontreal.ssj.util.io;
27import java.io.IOException;
44 public String
readString(String label)
throws IOException;
49 public int readInt(String label)
throws IOException;
54 public float readFloat(String label)
throws IOException;
59 public double readDouble(String label)
throws IOException;
172 public
void close() throws IOException;
178 public
void reset() throws IOException;
This class represents a data field from a file read by an instance of a class implementing DataReader...
double[][] readDoubleArray2D(String label)
Reads the first field labeled as label and returns its value as a two-dimensional array of double’s.
int readInt(String label)
Reads the first field labeled as label and returns its int value.
DataField readNextField()
Reads the next available field.
void close()
Closes the input stream.
float[][] readFloatArray2D(String label)
Reads the first field labeled as label and returns its value as a two-dimensional array of float’s.
boolean dataPending()
Returns true if there remains data to be read.
float readFloat(String label)
Reads the first field labeled as label and returns its float value.
void reset()
Resets the reader to its initial state, i.e.
int[] readIntArray(String label)
Reads the first field labeled as label and returns its value as a one-dimensional array of int’s.
float[] readFloatArray(String label)
Reads the first field labeled as label and returns its value as a one-dimensional array of float’s.
String[] readStringArray(String label)
Reads the first field labeled as label and returns its value as a one-dimensional array of String’s.
double readDouble(String label)
Reads the first field labeled as label and returns its double value.
Map< String, DataField > readAllFields()
Reads all fields in the file and returns a hashmap indexed by field labels.
Map< String, DataField > readAllNextFields()
Reads all remaining fields in the file and returns a hashmap indexed by field labels.
String[][] readStringArray2D(String label)
Reads the first field labeled as label and returns its value as a two-dimensional array of String’s.
double[] readDoubleArray(String label)
Reads the first field labeled as label and returns its value as a one-dimensional array of double’s.
DataField readField(String label)
Reads the first field labeled as label.
String readString(String label)
Reads the first field labeled as label and returns its String value.
int[][] readIntArray2D(String label)
Reads the first field labeled as label and returns its value as a two-dimensional array of int’s.