FileDocCategorySizeDatePackage
Unzipper2.javaAPI DocExample820Sun Mar 28 19:07:28 BST 1999None

Unzipper2

public class Unzipper2 extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    for (int i = 0; i < args.length; i++) {
      try {
        FileInputStream fin = new FileInputStream(args[i]);
        ZipInputStream zin = new ZipInputStream(fin);
        ZipEntry ze = null;
        while ((ze = zin.getNextEntry()) != null) {
          System.out.println("Unzipping " + ze.getName());
          FileOutputStream fout = new FileOutputStream(ze.getName());
          StreamCopier.copy(zin, fout);
          zin.closeEntry();
          fout.close();
        }
        zin.close();
      }
      catch (IOException e) {
        System.err.println(e);
        e.printStackTrace();
      }       
    }