byte[] byte = new byte[1024]; int len =0 ; while((len=in.read(b))!=-1){ out.write(b,0,len); } read函数返回的是缓冲数组中实际上读入的字节数,无论是read(byte[] b) 还是 read(byte[] b,int off,int length).对于read(byte[] b),它默认执行read(byte[] b,0,b.length).所以应该可以用read(byte[] b)代替的 . 解…