posted 21 years ago
Hai All,
I want to unzip a zipfile which contain the some
file like , *.tif, *.exe, *.xml, *.ppt, *.rtf
etc...
and I wrote the following code :
ZipFile f= new ZipFile(pathToZipFile) ;
java.util.Enumeration enu = f.entries() ;
while(enu.hasMoreElements()){
ZipEntry entry = (ZipEntry) enu.nextElement() ;
System.out.println("entrys = "+entry.getName());
java.io.InputStream in = f.getInputStream(entry) ;
java.io.FileOutputStream out = new java.io.FileOutputStream(entry.getName() ) ;
for (int ch = in.read(); ch != -1 ; ch = in.read() ) {
out.write(ch) ;
out.close() ;
in.close() ;
}
but it pop up with the following exception :
java.io.IOException: The specified procedure could not be found
I am lokking forward to have a solution.
Greetings,
Nishar.