/**
* 通过vector容器使用sequenceInputStream
* @param destPath
*/
public void merge(String destPath){
File dest = new File(destPath);
BufferedOutputStream bos=null;
SequenceInputStream sis=null;
Vector<InputStream> vi = new Vector<InputStream>();
try {
for(int i=0;i<blockPath.size();i++){
vi.add(new BufferedInputStream(new FileInputStream(this.blockPath.get(i))));
}
bos = new BufferedOutputStream(new FileOutputStream(dest,true));
sis=new SequenceInputStream(vi.elements());
byte[]flush =new byte[1024];
int len=0;
while(-1!=(len=sis.read(flush))){
bos.write(flush, 0, len);
}
bos.flush();
IOUtil.ioclose(sis);
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}finally{
IOUtil.ioclose(bos);
}
}