IO流,序列流。SequenceInputStream
public static void main(string[] args){
FileInputStream fisl = new FileInputStream ("a.txt"); //创建字节输入流关联a.txt文件
FileInputStream fis2 = new FileInputStream ("b.txt");
SequenceInputStream sis = new SequenceInputStream (fis1,fis2); //将两个流整合成一个流
FileOutputStream fos = new FileOutputStream ("c.txt");
int b1;
while((b = sis.read() != -1){
fos.write(b);
}
sis.close(); //sis在关闭的时候,会将构造方法中传入的流对象也都关闭掉
fos.close();
}
添加微信进交流群: opiopi293