public String readFile(String fileName) {

		StringBuffer content = new StringBuffer();
		String line;
		BufferedReader in;
		try {
			Reader reader;
			if (mode == APPLET_MODE)
				reader = new InputStreamReader(
						FileUtils.class.getResourceAsStream("/" + fileName));
			else
				reader = new FileReader(fileName);

			in = new BufferedReader(reader);

			while ((line = in.readLine()) != null)
				content.append(line + "\n");

		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

		return content.toString();
	}