Java ZipEntry Read getZipEntry(String name, ZipFile zipFile)

Here you can find the source of getZipEntry(String name, ZipFile zipFile)

Description

get Zip Entry

License

Mozilla Public License

Declaration

public static ZipEntry getZipEntry(String name, ZipFile zipFile) 

Method Source Code

//package com.java2s;
//     The contents of this file are subject to the Mozilla Public License

import java.util.Enumeration;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;

public class Main {
    public static ZipEntry getZipEntry(String name, ZipFile zipFile) {
        Enumeration<? extends ZipEntry> entries = zipFile.entries();
        while (entries.hasMoreElements()) {
            ZipEntry entry = entries.nextElement();
            if (entry.getName().endsWith(name)) {
                return entry;
            }/*  ww  w . j  av a2 s.c o m*/
        }
        return null;
    }
}

Related

  1. getNextZipEntry(ZipInputStream in)
  2. getSimpleName(ZipEntry entry)
  3. getZipEntry(File f, String nameToRead, String fileName)
  4. getZipEntry(final ZipFile zipFile, final CharSequence zippedName)
  5. getZipEntry(String zipEntryName)
  6. getZipEntry(String zipFileLoc)
  7. getZipEntry(ZipFile jarFile, String path)
  8. getZipEntry(ZipFile zip, final String name)