private void init() {
    try {
      // extracts just sizes only.
      final ZipFile zf = new ZipFile(jarFileName);
      final Enumeration<? extends ZipEntry> e = zf.entries();
      while (e.hasMoreElements()) {
        final ZipEntry ze = e.nextElement();

        if (debugOn) {
          System.out.println(dumpZipEntry(ze));
        }

        htSizes.put(ze.getName(), (int) ze.getSize());
      }
      zf.close();

      // extract resources and put them into the hashtable.
      final FileInputStream fis = new FileInputStream(jarFileName);
      final BufferedInputStream bis = new BufferedInputStream(fis);
      final ZipInputStream zis = new ZipInputStream(bis);
      ZipEntry ze = null;
      while ((ze = zis.getNextEntry()) != null) {
        if (ze.isDirectory()) {
          continue;
        }

        if (debugOn) {
          System.out.println("ze.getName()=" + ze.getName() + "," + "getSize()=" + ze.getSize());
        }

        int size = (int) ze.getSize();
        // -1 means unknown size.
        if (size == -1) {
          size = htSizes.get(ze.getName()).intValue();
        }

        final byte[] b = new byte[size];
        int rb = 0;
        int chunk = 0;
        while ((size - rb) > 0) {
          chunk = zis.read(b, rb, size - rb);
          if (chunk == -1) {
            break;
          }
          rb += chunk;
        }

        // add to internal resource hashtable
        htJarContents.put(ze.getName(), b);

        if (debugOn) {
          System.out.println(
              ze.getName() + "  rb=" + rb + ",size=" + size + ",csize=" + ze.getCompressedSize());
        }
      }
      zis.close();
    } catch (final NullPointerException e) {
      System.out.println("done.");
    } catch (final FileNotFoundException e) {
      e.printStackTrace();
    } catch (final IOException e) {
      e.printStackTrace();
    }
  }
initializes internal hash tables with Jar file resources.
java/zylib/src/main/java/com/google/security/zynamics/zylib/plugins/JarResources.java