public class DoubleFileConverter
extends java.lang.Object
Constructor and Description |
---|
DoubleFileConverter() |
Modifier and Type | Method and Description |
---|---|
static java.util.ArrayList<java.lang.Double> |
readBinaryFile(java.lang.String doubleBinaryFilename)
Read doubles from a binary file of a given name, one double at a time, and return an ArrayList<Double> of those doubles.
|
static java.util.ArrayList<java.lang.Double> |
readBinaryListFile(java.lang.String doubleBinaryListFilename)
Read an an ArrayList<Double> from a binary file of a given name and return it.
|
static java.util.ArrayList<java.lang.Double> |
readTextFile(java.lang.String doubleTextFilename)
Read doubles from a text file of a given name, one double per line, and return an ArrayList<Double> of those doubles.
|
static void |
writeBinaryFile(java.lang.String doubleBinaryFilename,
java.util.ArrayList<java.lang.Double> doubles)
Write given doubles to a binary file of a given name, one double at a time.
|
static void |
writeBinaryListFile(java.lang.String doubleBinaryListFilename,
java.util.ArrayList<java.lang.Double> doubles)
Write a given ArrayList<Double> to a binary file of a given name.
|
static void |
writeTextFile(java.lang.String doubleTextFilename,
java.util.ArrayList<java.lang.Double> doubles)
Write given doubles to a text file of a given name, one double per line.
|
public static java.util.ArrayList<java.lang.Double> readTextFile(java.lang.String doubleTextFilename)
doubleTextFilename
- filename where doubles are read frompublic static void writeTextFile(java.lang.String doubleTextFilename, java.util.ArrayList<java.lang.Double> doubles)
doubleTextFilename
- filename where doubles are written todoubles
- an ArrayList<Double> of the double values to be writtenpublic static java.util.ArrayList<java.lang.Double> readBinaryFile(java.lang.String doubleBinaryFilename)
doubleBinaryFilename
- filename where doubles are read frompublic static void writeBinaryFile(java.lang.String doubleBinaryFilename, java.util.ArrayList<java.lang.Double> doubles)
doubleBinaryFilename
- filename where doubles are written todoubles
- an ArrayList<Double> of the double values to be writtenpublic static java.util.ArrayList<java.lang.Double> readBinaryListFile(java.lang.String doubleBinaryListFilename)
doubleBinaryListFilename
- filename where an ArrayList<Double> is read frompublic static void writeBinaryListFile(java.lang.String doubleBinaryListFilename, java.util.ArrayList<java.lang.Double> doubles)
doubleBinaryListFilename
- filename where the ArrayList<Double> is written todoubles
- an ArrayList<Double> to be written