我有一个文件,大小为3236000字节,我想从开头读取2936000字节并写入OutputStream。
InputStream is = new FileInputStream(file1);
OutputStream os = new FileOutputStream(file2);
AFunctionToCopy(is,os,0,2936000); /* a function or sourcecode to write input stream 0to2936000 bytes */
我可以逐字节地读写,但是从缓冲读取可能会太慢了(我认为)。那么如何进行拷贝呢?