FileDocCategorySizeDatePackage
Unzipper.javaAPI DocExample818Sun Mar 28 19:07:26 BST 1999None

Unzipper

public class Unzipper extends Object

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


    for (int i = 0; i < args.length; i++) {
      try {
        ZipFile zf = new ZipFile(args[i]);
        Enumeration e = zf.entries();
        while (e.hasMoreElements()) {
          ZipEntry ze = (ZipEntry) e.nextElement();
          System.out.println("Unzipping " + ze.getName());
          FileOutputStream fout = new FileOutputStream(ze.getName());
          InputStream in = zf.getInputStream(ze);
          StreamCopier.copy(in, fout);
          in.close();
          fout.close();
        }
      }
      catch (IOException e) {
        System.err.println(e);
        e.printStackTrace();
      }       
    }