File Reader function as follows:
public static String readFileAsString(String fileName)throws Exception { String data = ""; data = new