Examples of entries()


Examples of java.util.zip.ZipFile.entries()

            if (!isSupportedVersion(zf)) {
                clear();
                return;
            }
           
            Enumeration<? extends ZipEntry> list = zf.entries();

            listener.notifyStarted();
            listener.notifyProcessingCount(zf.size());

            listener.sendMessage(DcResources.getText("msgStartRestore"));
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

            logger.debug("Loading module JAR " + filename);
           
            ZipFile zf = new ZipFile(DataCrow.moduleDir + filename);

            Map<String, byte[]> content = new HashMap<String, byte[]>();
            Enumeration<? extends ZipEntry> list = zf.entries();
            while (list.hasMoreElements()) {
                ZipEntry ze = list.nextElement();

                BufferedInputStream bis = new BufferedInputStream(zf.getInputStream(ze));
                int size = (int) ze.getSize();
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

    private byte[] loadFromJar(String jar, String name) {
        BufferedInputStream bis = null;
        ZipFile zf = null;
        try {
            zf = new ZipFile(jar);
            Enumeration<? extends ZipEntry> entries = zf.entries();
            while (entries.hasMoreElements()) {
                ZipEntry entry = entries.nextElement();
                if (entry.getName().equals(name)) {
                    bis = new BufferedInputStream(zf.getInputStream(entry));
                    int size = (int) entry.getSize();
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

        if (isArchive(resource))
        {
            final ZipFile archive = getArchive(resource);
            if (archive != null)
            {
                for (final Enumeration entries = archive.entries(); entries.hasMoreElements();)
                {
                    final ZipEntry entry = (ZipEntry)entries.nextElement();
                    contents.add(entry.getName());
                }
            }
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

        ZipEntry entry = zip.getEntry("jre");
       
        // Overkill: entry exists and was checked by the installer main function
        if (entry==null) throw new IOException("Internal Error!");
       
        Enumeration enumEntries = zip.entries();
        while (enumEntries.hasMoreElements()) {
         
          entry = (ZipEntry)enumEntries.nextElement();
          if (!entry.getName().startsWith("jre")) continue;
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

        } catch (ZipException e) {
            return retval;
        } catch (IOException e) {
            return retval;
        }
        Enumeration e = zf.entries();
        while (e.hasMoreElements()) {
            ZipEntry ze = (ZipEntry) e.nextElement();
            String fileName = ze.getName();
            boolean accept = pattern.matcher(fileName).matches();
            if (accept) {
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

          logger.error(msg, ex);
          continue;
        }
        notifyListenersLoadedZipFile(file.getName());

        for (Iterator it = new EnumerationIterator(zipFile.entries()); it.hasNext();)
        {
          Class cls = null;
          String entryName = ((ZipEntry) it.next()).getName();
          String className = Utilities.changeFileNameToClassName(entryName);
          if (className != null)
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

  @Override
  public void copyResourceFromJarFile(String jarFilename, String resourceName, String destinationFile)
    throws ZipException, IOException
  {
    ZipFile appJar = new ZipFile(new File(jarFilename));
    Enumeration<? extends ZipEntry> entries = appJar.entries();
    while (entries.hasMoreElements())
    {
      ZipEntry entry = entries.nextElement();
      String entryName = entry.getName();
      if (entryName.endsWith(resourceName))
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

   * directory.
   */
  public static void unzip(java.io.File file, EntryHandler entryHandler)
      throws Exception {
    ZipFile zipFile = new ZipFile(file);
    Enumeration entries = zipFile.entries();
    while (entries.hasMoreElements()) {
      ZipEntry entry = (ZipEntry) entries.nextElement();

      String entryName = entry.getName();
      if (entryName.endsWith("/")) {
View Full Code Here

Examples of java.util.zip.ZipFile.entries()

            File f = new File(file);
            if (f.isDirectory()) {
                scanDirectory("", f, suite, clazz);
            } else {
                ZipFile zip = new ZipFile(file);
                Enumeration<? extends ZipEntry> entries = zip.entries();
                while (entries.hasMoreElements()) {
                    ZipEntry e = entries.nextElement();
                    String n = e.getName();
                    String p = n.replace('/', '.');
                    if (n.endsWith(".class") && (clazz == null || p.indexOf(clazz) != -1)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.