KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > webwork > portlet > util > UrlUnzipper


1 package com.opensymphony.webwork.portlet.util;
2
3
4 import java.io.File JavaDoc;
5 import java.net.URL JavaDoc;
6 import java.util.zip.ZipInputStream JavaDoc;
7
8 public class UrlUnzipper extends AbstractUnzipper {
9     private URL JavaDoc zipUrl;
10
11
12     public UrlUnzipper(URL JavaDoc zipUrl, File JavaDoc destDir) {
13         this.zipUrl = zipUrl;
14         super.destDir = destDir;
15     }
16
17     public void unzip()
18             throws Exception JavaDoc {
19         ZipInputStream JavaDoc zis = new ZipInputStream JavaDoc(zipUrl.openStream());
20         java.util.zip.ZipEntry JavaDoc zipEntry;
21         while ((zipEntry = zis.getNextEntry()) != null) saveEntry(zis, zipEntry);
22     }
23
24     public File JavaDoc unzipFileInArchive(String JavaDoc fileName)
25             throws Exception JavaDoc {
26         throw new UnsupportedOperationException JavaDoc("Feature not implemented.");
27     }
28
29 }
30
Popular Tags