正确格式:
public static void main(String[] args) throws IOException {
FileInputStream fi = new FileInputStream("test.txt");
int by;
while ((by = fi.read()) != -1) {
System.out.print((char) by);
}
fi.close();
}
字节流读数据
阅读 149
2022-04-25
public static void main(String[] args) throws IOException {
FileInputStream fi = new FileInputStream("test.txt");
int by;
while ((by = fi.read()) != -1) {
System.out.print((char) by);
}
fi.close();
}
相关推荐
精彩评论(0)