/** * Reads the given file as UTF-8 * * @param file * The file to read * @return The contents of the file * @throws IOException * if there is an issue reading the file. */ public static String readFileUTF8(final File file) throws IOException { final byte[] bytes = IOUtil.readFileBytes(file); return new String(bytes, StandardCharsets.UTF_8); }
/** * Reads the given file as UTF-8 * * @param file * The file to read * @return The contents of the file * @throws IOException * iff there is an issue reading the file. */ public static String readFileUTF8(File file) throws IOException { byte[] bytes = IOUtil.readFileBytes(file); return new String(bytes, UTF8); }
/** * Reads the given file as UTF-8 * * @param file * The file to read * @return The contents of the file * @throws IOException * if there is an issue reading the file. */ public static String readFileUTF8(final File file) throws IOException { final byte[] bytes = IOUtil.readFileBytes(file); return new String(bytes, StandardCharsets.UTF_8); }