//文件读取和写入
// File file=new File(路径);
// try {
// //文件读取
// FileInputStream fis=new FileInputStream(file);
// byte[] b=new byte[200];
// fis.read(b);
// fis.close();
// String str=new String(b);
// //去空格
// System.out.println(str.trim());
// String str=null;
// FileOutputStream fos=new FileOutputStream(file);
// str=“jj你好fadf”;
// fos.write(str.getBytes());
// fos.close();
// } catch (Exception e) {
// // TODO: handle exception
// }
io流的文件读取和写入
最新推荐文章于 2022-02-10 17:36:57 发布