Java中的I/O流

import java.io.*

//生成代表输入流的对象
fis=new FileInputStream("e:/src/from.txt")
//生成代表输出流的对象
fos=new FileOutputStream("e:/src/to.txt")
//生成一个字节数组
byte [] buffer = new byte[1024] //当读取的文件为空值时,read方法返回值为-1
int temp=fis.read(buffer,0,buffer.length) fos.write(buffer,0,temp)
上一篇:oracle 方向及资料


下一篇:Zero Clipboard - 跨浏览器兼容的“复制到剪贴板”功能