public class test_11 {
public static void main(String[] args) throws IOException {
Vector<FileInputStream> vec=new Vector<>();
vec.add(new FileInputStream("F:\\黑马\\0001.avi"));
vec.add(new FileInputStream("F:\\黑马\\0002.avi"));
Enumeration enu=vec.elements();
SequenceInputStream sequece=new SequenceInputStream(enu);
PrintStream pri=new PrintStream(new FileOutputStream("d:"+File.separator+"4.avi"),true);
byte[] b=new byte[1024];
int len=0;
while((len=sequece.read(b))!=-1)
{
pri.write(b,0,len);
pri.flush();
}
pri.close();
sequece.close();
}
}
这是图片和程序,大神们帮忙下,小白一枚求解 |