SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.util.io.CachedDataWriter Class Referenceabstract

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...

Inheritance diagram for umontreal.ssj.util.io.CachedDataWriter:
umontreal.ssj.util.io.AbstractDataWriter umontreal.ssj.util.io.DataWriter umontreal.ssj.util.io.TextDataWriter

Public Member Functions

 CachedDataWriter ()
 Class constructor.
Writing atomic data @{
void write (String label, String s) throws IOException
 Writes an atomic string field.
void write (String label, int a) throws IOException
 Writes an atomic 32-bit integer (big endian).
void write (String label, float a) throws IOException
 Writes an atomic 32-bit float (big endian).
void write (String label, double a) throws IOException
 Writes an atomic 64-bit double (big endian).
Writing one-dimensional arrays @{
void write (String label, String[] a, int n) throws IOException
 Writes the first n elements of a one-dimensional array of strings.
void write (String label, int[] a, int n) throws IOException
 Writes the first n elements of a one-dimensional array of 32-bit integers (big endian).
void write (String label, float[] a, int n) throws IOException
 Writes the first n elements of a one-dimensional array of 32-bit floats (big endian).
void write (String label, double[] a, int n) throws IOException
 Writes the first n elements of a one-dimensional array of 64-bit doubles (big endian).
Writing two-dimensional arrays @{
void write (String label, String[][] a) throws IOException
 Writes a two-dimensional array of strings.
void write (String label, int[][] a) throws IOException
 Writes a two-dimensional array of 32-bit integers (big endian).
void write (String label, float[][] a) throws IOException
 Writes a two-dimensional array of 32-bit floats (big endian).
void write (String label, double[][] a) throws IOException
 Writes a two-dimensional array of 64-bit doubles (big endian).
Public Member Functions inherited from umontreal.ssj.util.io.AbstractDataWriter
void write (String label, String[] a) throws IOException
 Writes a one-dimensional array of strings.
void write (String label, int[] a) throws IOException
 Writes a one-dimensional array of 32-bit integers (big endian).
void write (String label, float[] a) throws IOException
 Writes a one-dimensional array of 32-bit floats (big endian).
void write (String label, double[] a) throws IOException
 Writes a one-dimensional array of 64-bit doubles (big endian).
Public Member Functions inherited from umontreal.ssj.util.io.DataWriter
void close () throws IOException
 Flushes any pending data and closes the output stream.

Detailed Description

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.

Definition at line 37 of file CachedDataWriter.java.

Constructor & Destructor Documentation

◆ CachedDataWriter()

umontreal.ssj.util.io.CachedDataWriter.CachedDataWriter ( )

Class constructor.

Definition at line 49 of file CachedDataWriter.java.

Member Function Documentation

◆ write() [1/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
double a ) throws IOException

Writes an atomic 64-bit double (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 85 of file CachedDataWriter.java.

◆ write() [2/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
double[] a,
int n ) throws IOException

Writes the first n elements of a one-dimensional array of 64-bit doubles (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 125 of file CachedDataWriter.java.

◆ write() [3/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
double a[][] ) throws IOException

Writes a two-dimensional array of 64-bit doubles (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 165 of file CachedDataWriter.java.

◆ write() [4/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
float a ) throws IOException

Writes an atomic 32-bit float (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 77 of file CachedDataWriter.java.

◆ write() [5/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
float[] a,
int n ) throws IOException

Writes the first n elements of a one-dimensional array of 32-bit floats (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 117 of file CachedDataWriter.java.

◆ write() [6/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
float a[][] ) throws IOException

Writes a two-dimensional array of 32-bit floats (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 157 of file CachedDataWriter.java.

◆ write() [7/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
int a ) throws IOException

Writes an atomic 32-bit integer (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 69 of file CachedDataWriter.java.

◆ write() [8/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
int[] a,
int n ) throws IOException

Writes the first n elements of a one-dimensional array of 32-bit integers (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 109 of file CachedDataWriter.java.

◆ write() [9/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
int a[][] ) throws IOException

Writes a two-dimensional array of 32-bit integers (big endian).

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 149 of file CachedDataWriter.java.

◆ write() [10/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
String s ) throws IOException

Writes an atomic string field.

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 61 of file CachedDataWriter.java.

◆ write() [11/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
String[] a,
int n ) throws IOException

Writes the first n elements of a one-dimensional array of strings.

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 101 of file CachedDataWriter.java.

◆ write() [12/12]

void umontreal.ssj.util.io.CachedDataWriter.write ( String label,
String a[][] ) throws IOException

Writes a two-dimensional array of strings.

Writes an anonymous field if label is null.

Implements umontreal.ssj.util.io.DataWriter.

Definition at line 141 of file CachedDataWriter.java.


The documentation for this class was generated from the following file: