Android Utililty Methods Unzip File

List of utility methods to do Unzip File

Description

The list of methods to do Unzip File are organized into topic(s).

Method

voidupZipFile(File zipFile, String folderPath)
up Zip File
File desDir = new File(folderPath);
if (!desDir.exists()) {
    desDir.mkdirs();
ZipFile zf = new ZipFile(zipFile);
for (Enumeration<?> entries = zf.entries(); entries
        .hasMoreElements();) {
    ZipEntry entry = ((ZipEntry) entries.nextElement());
...
voidupZipFile(String zipFile, String folderPath)
up Zip File
File desDir = new File(folderPath);
if (!desDir.exists()) {
    desDir.mkdirs();
ZipFile zf = new ZipFile(zipFile);
InputStream in = null;
OutputStream out = null;
try {
...
voidupZipFile(String zipFile, String folderPath)
up Zip File
File desDir = new File(folderPath);
if (!desDir.exists()) {
    desDir.mkdirs();
ZipFile zf = new ZipFile(zipFile);
InputStream in = null;
OutputStream out = null;
try {
...
ArrayListupZipSelectedFile(File zipFile, String folderPath, String nameContains)
up Zip Selected File
ArrayList<File> fileList = new ArrayList<File>();
File desDir = new File(folderPath);
if (!desDir.exists()) {
    desDir.exists();
ZipFile zf = new ZipFile(zipFile);
for (Enumeration<?> entries = zf.entries(); entries
        .hasMoreElements();) {
...
ArrayListupZipSelectedFile(File zipFile, String folderPath, String nameContains)
up Zip Selected File
ArrayList<File> fileList = new ArrayList<File>();
File desDir = new File(folderPath);
if (!desDir.exists()) {
    desDir.mkdir();
ZipFile zf = new ZipFile(zipFile);
for (Enumeration<?> entries = zf.entries(); entries
        .hasMoreElements();) {
...
voidunZip(File srcFile, File targetFile)
un Zip
if (!srcFile.exists())
    return;
if (!targetFile.getParentFile().exists())
    targetFile.getParentFile().mkdir();
while (true) {
    FileOutputStream localFileOutputStream;
    byte[] arrayOfByte;
    int i;
...
booleanunZip(String zipFile, String targetPath)
un Zip
createDir(targetPath, "");
try {
    FileInputStream fin = new FileInputStream(zipFile);
    ZipInputStream zin = new ZipInputStream(fin);
    ZipEntry ze = null;
    while ((ze = zin.getNextEntry()) != null) {
        if (ze.isDirectory()) {
            createDir(targetPath, ze.getName());
...
voidunZip(String zipfile, String destDir)
un Zip
byte b[] = new byte[1024];
int length;
ZipFile zipFile = null;
try {
    zipFile = new ZipFile(new File(zipfile));
    Enumeration<ZipEntry> enumeration = (Enumeration<ZipEntry>) zipFile
            .entries();
    ZipEntry zipEntry = null;
...
java.io.InputStreamUpZip(String zipFileString, String fileString)
Up Zip
android.util.Log.v("XZip", "UpZip(String, String)");
ZipFile zipFile = new ZipFile(zipFileString);
ZipEntry zipEntry = zipFile.getEntry(fileString);
return zipFile.getInputStream(zipEntry);
java.io.InputStreamUpZip(String zipFileString, String fileString)
Up Zip
ZipFile zipFile = new ZipFile(zipFileString);
ZipEntry zipEntry = zipFile.getEntry(fileString);
return zipFile.getInputStream(zipEntry);