读取文本
public static String readText(File file) { StringBuilder result = new StringBuilder(); try (FileReader reader = new FileReader(file);) { int count = 0; char[] buffer = new char[1024]; while ((count = reader.read(buffer, 0, buffer.length)) > 0) { result.append(new java.lang.String(buffer, 0, count)); // Arrays.fill(buffer, '\0'); } } catch (Exception e) { e.printStackTrace(); } return result.toString(); }