com.epochx.util
Class FileManip

java.lang.Object
  extended by com.epochx.util.FileManip

public class FileManip
extends java.lang.Object

The File Manip class controls all text output and input file requirements


Constructor Summary
FileManip()
           
 
Method Summary
static void deleteOld(java.io.File cDir, java.lang.String fName)
          This method deletes a file
static void doOutput(java.io.File cDir, java.util.ArrayList<java.lang.String> infoToSave, java.lang.String fileName, boolean append)
          This method controls sending information files
static java.util.List<java.lang.String> loadInput(java.io.File fileToLoad)
          Loads an input file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileManip

public FileManip()
Method Detail

doOutput

public static void doOutput(java.io.File cDir,
                            java.util.ArrayList<java.lang.String> infoToSave,
                            java.lang.String fileName,
                            boolean append)
This method controls sending information files

Parameters:
cDir - A file object representing the directory to send the output files to.
infoToSave - An ArrayList of the information to be saved to the file. Each element in the ArrayList represents a new line in the output file.
fileName - A String which will be the name of the output file.
append - True if you want information to be added to the file and false if you want the file to be overwritten

loadInput

public static java.util.List<java.lang.String> loadInput(java.io.File fileToLoad)
Loads an input file

Parameters:
fileToLoad - the input file to load.
Returns:
An ArrayList representing the input data. Each element in the ArrayList represents a line of data from the input file

deleteOld

public static void deleteOld(java.io.File cDir,
                             java.lang.String fName)
This method deletes a file

Parameters:
cDir - A File object representing the location fo the file to be deleted
fName - The name of the file to be deleted