Published in: Java
import java.io.ByteArrayOutputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.util.zip.InflaterInputStream; import java.util.zip.ZipEntry; import java.util.zip.ZipInputStream; public class ZipInputStreamTest { /** * @param args * @throws IOException */ { ZipEntry current_zip_entry = null; while( ( current_zip_entry = zip_inputstream.getNextEntry() ) != null ) { int data = 0; while( ( data = zip_inputstream.read() ) != - 1 ) { output.write( data ); } // The ZipEntry is extracted in the output output.close(); } zip_inputstream.close(); file.close(); } }
You need to login to post a comment.
