nom.tam.util.test
Class BufferedFileTester

java.lang.Object
  extended by nom.tam.util.test.BufferedFileTester

public class BufferedFileTester
extends java.lang.Object

This class provides runs tests of the BufferedI/O classes: BufferedFile, BufferedDataInputStream and BufferedDataOutputStream. A limited comparison to the standard I/O classes can also be made.

Input and output of all primitive scalar and array types is tested, however input and output of String data is not. Users may choose to test the BufferedFile class, the BufferedDataXPUT classes array methods, the BufferedDataXPUT classes using the methods of DataXput, the traditional I/O classes, or any combination thereof.


Constructor Summary
BufferedFileTester()
           
 
Method Summary
static void bufferedFileTest(java.lang.String filename, int iter, double[] db, double[] db2, float[] fl, float[] fl2, long[] ln, long[] ln2, int[] in, int[] in2, short[] sh, short[] sh2, char[] ch, char[] ch2, byte[] by, byte[] by2, boolean[] bl, boolean[] bl2, int[][][][] multi, int[][][][] multi2)
           
static void bufferedStreamTest(java.lang.String filename, int iter, double[] db, double[] db2, float[] fl, float[] fl2, long[] ln, long[] ln2, int[] in, int[] in2, short[] sh, short[] sh2, char[] ch, char[] ch2, byte[] by, byte[] by2, boolean[] bl, boolean[] bl2, int[][][][] multi, int[][][][] multi2)
           
static void buffStreamSimpleTest(java.lang.String filename, int iter, int[] in, int[] in2)
           
static void main(java.lang.String[] args)
          Usage: java nom.tam.util.test.BufferedFileTester file [dim [iter [flags]]] where file is the file to be read and written.
static void standardFileTest(java.lang.String filename, int iter, int[] in, int[] in2)
           
static void standardStreamTest(java.lang.String filename, int iter, int[] in, int[] in2)
           
 void testBufferedFile()
           
 void testBufferedStreams()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BufferedFileTester

public BufferedFileTester()
Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Usage: java nom.tam.util.test.BufferedFileTester file [dim [iter [flags]]] where file is the file to be read and written. dim is the dimension of the arrays to be written. iter is the number of times each array is written. flags a string indicating what I/O to test O -- test old I/O (RandomAccessFile and standard streams) R -- BufferedFile (i.e., random access) S -- BufferedDataXPutStream X -- BufferedDataXPutStream using standard methods

Throws:
java.lang.Exception

standardFileTest

public static void standardFileTest(java.lang.String filename,
                                    int iter,
                                    int[] in,
                                    int[] in2)
                             throws java.lang.Exception
Throws:
java.lang.Exception

standardStreamTest

public static void standardStreamTest(java.lang.String filename,
                                      int iter,
                                      int[] in,
                                      int[] in2)
                               throws java.lang.Exception
Throws:
java.lang.Exception

buffStreamSimpleTest

public static void buffStreamSimpleTest(java.lang.String filename,
                                        int iter,
                                        int[] in,
                                        int[] in2)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

bufferedStreamTest

public static void bufferedStreamTest(java.lang.String filename,
                                      int iter,
                                      double[] db,
                                      double[] db2,
                                      float[] fl,
                                      float[] fl2,
                                      long[] ln,
                                      long[] ln2,
                                      int[] in,
                                      int[] in2,
                                      short[] sh,
                                      short[] sh2,
                                      char[] ch,
                                      char[] ch2,
                                      byte[] by,
                                      byte[] by2,
                                      boolean[] bl,
                                      boolean[] bl2,
                                      int[][][][] multi,
                                      int[][][][] multi2)
                               throws java.lang.Exception
Throws:
java.lang.Exception

bufferedFileTest

public static void bufferedFileTest(java.lang.String filename,
                                    int iter,
                                    double[] db,
                                    double[] db2,
                                    float[] fl,
                                    float[] fl2,
                                    long[] ln,
                                    long[] ln2,
                                    int[] in,
                                    int[] in2,
                                    short[] sh,
                                    short[] sh2,
                                    char[] ch,
                                    char[] ch2,
                                    byte[] by,
                                    byte[] by2,
                                    boolean[] bl,
                                    boolean[] bl2,
                                    int[][][][] multi,
                                    int[][][][] multi2)
                             throws java.lang.Exception
Throws:
java.lang.Exception

testBufferedFile

public void testBufferedFile()
                      throws java.lang.Exception
Throws:
java.lang.Exception

testBufferedStreams

public void testBufferedStreams()
                         throws java.lang.Exception
Throws:
java.lang.Exception