system
Class TextFilePlug

java.lang.Object
  extended by system.TextFilePlug

public class TextFilePlug
extends java.lang.Object

This class corresponds directly to the TextFileSocket class. It is the systems plug into the Text Package.


Constructor Summary
TextFilePlug()
           
 
Method Summary
static java.util.List<java.util.List<java.lang.Object>> populate(java.lang.String fileName, char comma, int getTextType)
          Populates the data array list.
static boolean saveData(java.lang.String fileName, java.util.ArrayList<java.lang.Object> columnNames, java.util.List<java.util.List<java.lang.Object>> data, int saveAsType)
          Sends the data to be saved.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextFilePlug

public TextFilePlug()
Method Detail

populate

public static java.util.List<java.util.List<java.lang.Object>> populate(java.lang.String fileName,
                                                                        char comma,
                                                                        int getTextType)
                                                                 throws java.io.FileNotFoundException,
                                                                        java.io.IOException,
                                                                        java.lang.InstantiationException,
                                                                        java.lang.IllegalAccessException
Populates the data array list.

Parameters:
fileName - the name of the file to be opened.
comma - the deliminator to be passed.
getTextType - the text type that is to be opened.
Returns:
the list of list objects which contain the data.
Throws:
java.io.FileNotFoundException - throws all exceptions to be caught in the Bol class.
java.io.IOException - throws all exceptions to be caught in the Bol class.
java.lang.InstantiationException - throws all exceptions to be caught in the Bol class.
java.lang.IllegalAccessException - throws all exceptions to be caught in the Bol class.

saveData

public static boolean saveData(java.lang.String fileName,
                               java.util.ArrayList<java.lang.Object> columnNames,
                               java.util.List<java.util.List<java.lang.Object>> data,
                               int saveAsType)
                        throws java.io.FileNotFoundException,
                               java.io.IOException
Sends the data to be saved.

Parameters:
fileName - the name of the file the data should be saved.
columnNames - the column names the data is grouped under.
data - the data to be saved in the text file.
saveAsType - the type of file the data should be saved as.
Returns:
whether the data saved as a text file successfully.
Throws:
java.io.FileNotFoundException - throws all exceptions to be caught in the Bol class.
java.io.IOException - throws all exceptions to be caught in the Bol class.