java多文件复制
package file;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.SequenceInputStream;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
//多文件复制
public class Demo10 {
public static void main(String[] args) throws IOException {
// TODO Auto-generated method stub
textsequenceinputstream();
}
private static void textsequenceinputstream() throws IOException {
// TODO Auto-generated method stub
InputStream fis1 = new FileInputStream("D://a.txt");
InputStream fis2 = new FileInputStream("D://b.txt");
InputStream fis3 = new FileInputStream("D://c.txt");
Set<InputStream> set =new LinkedHashSet<InputStream>();
set.add(fis1);
set.add(fis2);
set.add(fis3);
final I