code: private static Manifest getManifest(final RegisteredResource rsrc) throws IOException {
          try (final InputStream ins = rsrc.getInputStream()) {
              if (ins != null) {
                  try (JarInputStream jis = new JarInputStream(ins)) {
                      return jis.getManifest();
                  }
              } else {
                  return null;
              }
          }
      }
docs: Read the manifest from supplied input stream, which is closed before return.