public class Test {
public static void main(String[] args) throws IOException {
try {
BufferedInputStream in = new BufferedInputStream(new FileInputStream(new File("d:/system.java")));
byte[] buf = new byte[1024 * 2];
in.read(buf, 0, buf.length);
System.out.println(new String(buf));
}
catch (FileNotFoundException ex) {
ex.printStackTrace();
}
catch (IOException ex) {
ex.printStackTrace();
}
}
}
javaio
最新推荐文章于 2022-07-14 19:53:47 发布