private static void sequenceOutputStream() throws FileNotFoundException,
// IOException {
// FileInputStream fis1 = new FileInputStream("a.txt");
// FileInputStream fis2 = new FileInputStream("b.txt");
// FileInputStream fis3 = new FileInputStream("g.txt");//?
// Vector v = new Vector();
// v.add(fis3);
// v.add(fis2);
// v.add(fis1);
// Enumeration enum1 = v.elements();
// //SequenceInputStream sos = new SequenceInputStream(v);
// while(enum1.hasMoreElements()){
// enum1.nextElement();
// }
// //SequenceInputStream sos = new SequenceInputStream(fis1,fis2);
// int len;
// FileOutputStream fos = new FileOutputStream("c.txt");
// while((len=sos.read())!=-1){
// fos.write(len);
// }
// sos.close();
// fos.close();
// }
|
|