SSJ
V. 2.6.2.

umontreal.iro.lecuyer.util.io
Class CachedDataWriter

java.lang.Object
  extended by umontreal.iro.lecuyer.util.io.AbstractDataWriter
      extended by umontreal.iro.lecuyer.util.io.CachedDataWriter
All Implemented Interfaces:
DataWriter
Direct Known Subclasses:
TextDataWriter

public abstract class CachedDataWriter
extends AbstractDataWriter

This abstract class implements shared functionality for data writers that store all fields in memory before outputing them with close.


Constructor Summary
CachedDataWriter()
          Class constructor.
 
Method Summary
 void write(String label, double a)
          Writes an atomic 64-bit double (big endian).
 void write(String label, double[][] a)
          Writes a two-dimensional array of 64-bit doubles (big endian).
 void write(String label, double[] a, int n)
          Writes the first n elements of a one-dimensional array of 64-bit doubles (big endian).
 void write(String label, float a)
          Writes an atomic 32-bit float (big endian).
 void write(String label, float[][] a)
          Writes a two-dimensional array of 32-bit floats (big endian).
 void write(String label, float[] a, int n)
          Writes the first n elements of a one-dimensional array of 32-bit floats (big endian).
 void write(String label, int a)
          Writes an atomic 32-bit integer (big endian).
 void write(String label, int[][] a)
          Writes a two-dimensional array of 32-bit integers (big endian).
 void write(String label, int[] a, int n)
          Writes the first n elements of a one-dimensional array of 32-bit integers (big endian).
 void write(String label, String s)
          Writes an atomic string field.
 void write(String label, String[][] a)
          Writes a two-dimensional array of strings.
 void write(String label, String[] a, int n)
          Writes the first n elements of a one-dimensional array of strings.
 
Methods inherited from class umontreal.iro.lecuyer.util.io.AbstractDataWriter
write, write, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface umontreal.iro.lecuyer.util.io.DataWriter
close
 

Constructor Detail

CachedDataWriter

public CachedDataWriter()
Class constructor.

Method Detail

write

public void write(String label,
                  String s)
           throws IOException
Writes an atomic string field. Writes an anonymous field if label is null.

Throws:
IOException

write

public void write(String label,
                  int a)
           throws IOException
Writes an atomic 32-bit integer (big endian). Writes an anonymous field if label is null.

Throws:
IOException

write

public void write(String label,
                  float a)
           throws IOException
Writes an atomic 32-bit float (big endian). Writes an anonymous field if label is null.

Throws:
IOException

write

public void write(String label,
                  double a)
           throws IOException
Writes an atomic 64-bit double (big endian). Writes an anonymous field if label is null.

Throws:
IOException

write

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

Throws:
IOException

write

public 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). Writes an anonymous field if label is null.

Throws:
IOException

write

public 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). Writes an anonymous field if label is null.

Throws:
IOException

write

public 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). Writes an anonymous field if label is null.

Throws:
IOException

write

public void write(String label,
                  String[][] a)
           throws IOException
Writes a two-dimensional array of strings. Writes an anonymous field if label is null.

Throws:
IOException

write

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

Throws:
IOException

write

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

Throws:
IOException

write

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

Throws:
IOException

SSJ
V. 2.6.2.

To submit a bug or ask questions, send an e-mail to Pierre L'Ecuyer.