@Override
    public Object[] readFromFile(String pathOfFile, int typeOfFile)
    {
        File data = new File(pathOfFile);
        BufferedReader incomingData = null;
        Object[] objects = {null};
        Object[] errorObject = { "Error: Incorrect file type!" };
        
        if(typeOfFile == 1)
        {        
        try 
        {
	   incomingData = new BufferedReader(new java.io.FileReader(data));
	   String line = incomingData.readLine();
           List fileData = new ArrayList();
           
	   while(line != null)
           {
                fileData.add(line);
                line = incomingData.readLine();
	   }
           
           objects[0] = fileData;
        } 
        catch(IOException ioe) 
        {
            System.out.println("Unable to read file!");
        }
        return objects;   
        }
        else
        {
        return errorObject;
        }
    }