java_IO读写模版
2013-12-06 23:57
351 查看
InputStream in = null; OutputStream out = null; try{ in = new FileInputStream(); int len=0; byte buffer[] = new byte[1024]; out = new FileOutputStream(); while((len=in.read(buffer))>0){ out.write(buffer,0,len); } }finally{ if(in!=null){ try{ in.close(); }catch(Exception e){ e.printStackTrace(); } } if(out!=null){ try{ out.close(); }catch(Exception e){ e.printStackTrace(); } } }
相关文章推荐
- IO与文件读写---Java的IO流架构
- Java学习笔记——File类文件管理及IO读写、复制操作
- java io 学习笔记(三) 字符流读写
- Java IO学习基础之读写文本文件
- java io读写操作
- Java File类文件管理及IO读写、复制操作
- 【java】 IO读写文件示例
- Java读写Properties文件及JavaIO中字节流和字符的转换
- Java IO ---学习笔记(标准流、内存读写流、顺序输入流)
- Java IO学习基础之读写文本文件
- java:IO-读写类的关系
- java:IO-java文件内容读写
- 【Java】File类文件管理及IO读写、复制操作
- Java IO读写大文件的几种方式及测试
- Java IO 文件读写相关的操作
- java IO操作 (读写、追加、删除、移动、复制等)
- Java IO学习基础之读写文本文-Java基础-Java-编程开发
- Java文件读写(IO)常用代码
- Java IO读写
- java:IO-读写大文件