提示
Java IO BufferedReader 使用示例。@ermo
public static void read() throws IOException {
String filepath = "src/main/resources/output.txt";
BufferedReader in = new BufferedReader(new FileReader(filepath));
char[] array = new char[100];
try {
in.read(array);
System.out.println(array);
} finally {
in.close();
}
}
public static void main(String[] args) throws IOException {
read();
}