bodhidharma.utilities
Class FileMethods

java.lang.Object
  extended by bodhidharma.utilities.FileMethods

public class FileMethods
extends java.lang.Object

A holder class for static methods relating to files.

Author:
Cory McKay

Constructor Summary
FileMethods()
           
 
Method Summary
static void copyFile(java.lang.String original, java.lang.String destination)
          Copies the contents of one file to another.
static java.lang.String[][] tokenizeTabDelFile(java.lang.String tab_del_file)
          Reads in a tab delimited text file and converts it into a 2-D String array whose first indice refers to the line number and the second refers to the token (as separated by tabs).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileMethods

public FileMethods()
Method Detail

copyFile

public static void copyFile(java.lang.String original,
                            java.lang.String destination)
                     throws java.lang.Exception
Copies the contents of one file to another. Throws an exception if the destination file already exists or if the original file does not exist.

Parameters:
original - The name of the file to be copied.
destination - The name of the file to be copied to.
Throws:
java.lang.Exception

tokenizeTabDelFile

public static java.lang.String[][] tokenizeTabDelFile(java.lang.String tab_del_file)
                                               throws java.lang.Exception
Reads in a tab delimited text file and converts it into a 2-D String array whose first indice refers to the line number and the second refers to the token (as separated by tabs).

Parameters:
tab_del_file - The path of the text file to convert.
Returns:
The parsed results.
Throws:
Throws - an exception if a problem occurs.
java.lang.Exception