public static String readTextFile(File f) throws IOException
	{
		if (f != null && f.exists()) {
			String str;
			Scanner reader = new Scanner(f);
			reader.useDelimiter("\\Z");
			
			try {
				str = reader.next();
			} catch (NoSuchElementException nsee) {
				reader.close();
				return null;
			}
			
			reader.close();
			return str;
		}
		return null;
	}