SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
AbstractDataWriter.java
1/*
2 * Class: AbstractDataWriter
3 * Description:
4 * Environment: Java
5 * Software: SSJ
6 * Copyright (C) 2001 Pierre L'Ecuyer and Universite de Montreal
7 * Organization: DIRO, Universite de Montreal
8 * @author David Munger
9 * @since August 2009
10 *
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 */
25package umontreal.ssj.util.io;
26
27import java.io.IOException;
28
34public abstract class AbstractDataWriter implements DataWriter {
35
39
44 public void write(String label, String[] a) throws IOException {
45 write(label, a, a.length);
46 }
47
52 public void write(String label, int[] a) throws IOException {
53 write(label, a, a.length);
54 }
55
60 public void write(String label, float[] a) throws IOException {
61 write(label, a, a.length);
62 }
63
68 public void write(String label, double[] a) throws IOException {
69 write(label, a, a.length);
70 }
71
72}
73
This abstract class implements shared functionality for data writers.
void write(String label, String[] a)
Writes a one-dimensional array of strings.
void write(String label, float[] a)
Writes a one-dimensional array of 32-bit floats (big endian).
void write(String label, double[] a)
Writes a one-dimensional array of 64-bit doubles (big endian).
void write(String label, int[] a)
Writes a one-dimensional array of 32-bit integers (big endian).