Examples of entries()


Examples of java.util.jar.JarFile.entries()

      // 2) Check for files within jars
      } else if (file.getName().endsWith(".jar")) {
        JarFile jar;
        try {
          jar = new JarFile(file);
          Enumeration<JarEntry> jarEntries = jar.entries();
          // Check in all jars - maybe we have context help files in
          // jar resources
          while (jarEntries.hasMoreElements()) {
            JarEntry jarEntry = jarEntries.nextElement();
            String jarEntryName = jarEntry.getName();
View Full Code Here

Examples of java.util.jar.JarFile.entries()

          }
          else // JAR file.
          {
            JarFile jarFile = new JarFile(locationFile);
            for(
              Enumeration<JarEntry> entries = jarFile.entries();
              entries.hasMoreElements();
              )
            {
              String jarEntryPath = ((JarEntry)entries.nextElement()).getName();
              if(
View Full Code Here

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

  static void extract(final File sourceZipFile, File unzipDestinationDirectory) throws IOException {
    // Open Zip file for reading
    ZipFile zipFile = new ZipFile(sourceZipFile, ZipFile.OPEN_READ);

    // Create an enumeration of the entries in the zip file
    Enumeration zipFileEntries = zipFile.entries();

    // Process each entry
    while (zipFileEntries.hasMoreElements()) {
      // grab a zip file entry
      ZipEntry entry = (ZipEntry) zipFileEntries.nextElement();
View Full Code Here

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

        ZipFile zipFile = null;
        IOException ioe = null;
        byte[] data = null;
        try {
            zipFile = new ZipFile(sSrcFileName + ZIP);
            Enumeration e = zipFile.entries();
            ZipEntry entry = null;
            if (e.hasMoreElements()) {
                entry = (ZipEntry) e.nextElement();
            }
            bis = new BufferedInputStream(zipFile.getInputStream(entry));
View Full Code Here

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

        BufferedInputStream bis = null;
        RandomAccessFile out = null;
        ZipFile zipFile = null;
        try {
            zipFile = new ZipFile(sSrcFileName + ZIP);
            Enumeration e = zipFile.entries();
            ZipEntry entry = null;
            if (e.hasMoreElements()) {
                entry = (ZipEntry) e.nextElement();
            }
            bis = new BufferedInputStream(zipFile.getInputStream(entry));
View Full Code Here

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

        init(path);
       
        for (File jf : jarFiles) {
            try {
                ZipFile zf = new ZipFile(jf);
                Enumeration<? extends ZipEntry> entries = zf.entries();
                while (entries.hasMoreElements()) {
                    ZipEntry entry = entries.nextElement();
                    String name = entry.getName();
                   
                    if (name.endsWith(".class")) {
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()

   
                Collection<ModuleJar> modules = new ArrayList<ModuleJar>();
                Map<String, Collection<DcImageIcon>> icons = new HashMap<String, Collection<DcImageIcon>>();
                Map<String, File> data = new HashMap<String, File>();
               
                Enumeration<? extends ZipEntry> list = zf.entries();
               
                client.notifyStarted(zf.size());
                while (list.hasMoreElements() && !canceled) {
                    ZipEntry ze = list.nextElement();
   
View Full Code Here

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

  public void unzip() throws Exception {
      if (zipFile == null || !zipFile.isFile())
          return;
      ZipFile zf = new ZipFile(zipFile);
      ZipEntry zipEntry;
      for (Enumeration zipEntries = zf.entries(); zipEntries.hasMoreElements(); saveEntry(
              zf.getInputStream(zipEntry), zipEntry))
          zipEntry = (ZipEntry) zipEntries.nextElement();

      zf.close();
  }
View Full Code Here

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

      File result = null;
      if (zipFile == null || !zipFile.isFile() || !TextUtils.stringSet(fileName))
          return result;
      boolean fileFound = false;
      ZipFile zf = new ZipFile(zipFile);
      Enumeration zipEntries = zf.entries();
      do {
          if (!zipEntries.hasMoreElements())
              break;
          ZipEntry entry = (ZipEntry) zipEntries.nextElement();
          String entryName = entry.getName();
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.