public static String readTextFile(String fileName, String defaultContents) throws IOException { return loadTextFile(fileName, defaultContents); } public static String readTextFile(File file) { try { return readTextFile(file, null); } catch (IOException e) { throw new RuntimeException(e); } } public static String readTextFile(File file, String defaultContents) throws IOException { return loadTextFile(file.getPath(), defaultContents); }