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