package com;
import java.io.FileInputStream;
import java.io.FileOutputStream;
public class demo01
{
public static void main(String[] args) throws Exception
{
FileInputStream fi=new FileInputStream("d:\\aa.txt");
FileOutputStream fo=new FileOutputStream("D:\
\bb.txt");
byte[] buff=new byte[1024];
int len=-1;
while((len=fi.read(buff))>0)
{
fo.write(buff, 0, len);
//System.out.println(buff);
System.out.println("---->"+len);
}
fi.close();
fo.close();
}