public class FileWriters
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
progressFile
Specifies the progress file we'll use.
|
Constructor and Description |
---|
FileWriters() |
Modifier and Type | Method and Description |
---|---|
static void |
appendToFile(java.lang.Object o,
java.lang.String filePath)
Appends the toString() of the given object in the given file.
|
static void |
appendToProgressFile(java.lang.Object o)
If
useProgressFile() is true, this will append s to the end of progressFile. |
static void |
setProgressFile(java.lang.String s)
Sets the progress file we'll use.
|
static boolean |
useProgressFile()
Returns true or false as progress file is set.
|
static void |
writeFile(double[] doubles,
java.lang.String filePath)
Prints the given array in the given file, one entry per line.
|
static void |
writeFile(int[] ints,
java.lang.String s)
Prints the given array in the given file, one entry per line.
|
static void |
writeFile(java.lang.Object[] arr,
java.lang.String filePath)
Prints the given array in the given file, one entry per line.
|
static void |
writeFile(java.lang.Object[] arr,
java.lang.String filePath,
java.lang.String sfx)
Prints the given array in the given file, one entry per line; sfx is appended at the end, with a \n between the last entry from arr and
the start of sfx.
|
static void |
writeFile(java.lang.Object o,
java.lang.String filePath)
Prints the toString() of the given object in the given file.
|
private static java.lang.String progressFile
public static void appendToFile(java.lang.Object o, java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static void appendToProgressFile(java.lang.Object o)
useProgressFile()
is true, this will append s to the end of progressFile.public static void setProgressFile(java.lang.String s)
appendToProgressFile(Object)
for recording the progress of various
algorithms. If the files already exists, first deletes it.public static boolean useProgressFile()
public static void writeFile(double[] doubles, java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static void writeFile(int[] ints, java.lang.String s) throws java.io.IOException
java.io.IOException
public static void writeFile(java.lang.Object[] arr, java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static void writeFile(java.lang.Object o, java.lang.String filePath) throws java.io.IOException
java.io.IOException
public static void writeFile(java.lang.Object[] arr, java.lang.String filePath, java.lang.String sfx) throws java.io.IOException
java.io.IOException