日期:2014-05-20 浏览次数:20657 次
FileInputStream input=new FileInputStream("C:\\users\\auxu\\desktop\\a.txt");
FileOutputStream output1=new FileOutputStream("C:\\users\\auxu\\desktop\\c.txt");
byte[] buffer=new byte[2];
int i=0;
while(input.available()>0){
input.read(buffer);
//System.out.println(buffer[0]+"\t"+buffer[1]);
output1.write(buffer);
System.out.println(++i);
}
FileInputStream input=new FileInputStream("C:\\users\\auxu\\desktop\\a.txt");
FileOutputStream output1=new FileOutputStream("C:\\users\\auxu\\desktop\\c.txt");
int i=0;
while(input.available()>0){
byte[] buffer=new byte[2];
input.read(buffer);
//System.out.println(buffer[0]+"\t"+buffer[1]);
output1.write(buffer);
System.out.println(++i);
}
FileInputStream input=new FileInputStream("C:\\users\\auxu\\desktop\\a.txt");
FileOutputStream output1=new FileOutputStream("C:\\users\\auxu\\desktop\\c.txt");
byte[] buffer=new byte[2];
int i=0;
int size = 0;
while(input.available()>0){
size = input.read(buffer);
//System.out.println(buffer[0]+"\t"+buffer[1]);
output1.write(buffer,0,size);
System.out.println(++i);
}