code: public JarStatus addResourcesFromJar(File jarFile) throws ApkCreationException,
              SealedApkException, DuplicateFileException {
          if (mIsSealed) {
              throw new SealedApkException("APK is already sealed");
          }
  
          try {
              verbosePrintln("%s:", jarFile);
  
              // reset the filter with this input.
              mFilter.reset(jarFile);
  
              // ask the builder to add the content of the file, filtered to only let through
              // the java resources.
              FileInputStream fis = new FileInputStream(jarFile);
              mBuilder.writeZip(fis, mFilter);
              fis.close();
  
              // check if native libraries were found in the external library. This should
              // constitutes an error or warning depending on if they are in lib/
              return new JarStatusImpl(mFilter.getNativeLibs(), mFilter.getNativeLibsConflict());
          } catch (DuplicateFileException e) {
              mBuilder.cleanUp();
              throw e;
          } catch (Exception e) {
              mBuilder.cleanUp();
              throw new ApkCreationException(e, "Failed to add %s", jarFile);
          }
      }
docs: Adds the resources from a jar file.
  @param jarFile the jar File.
  @return a {@link JarStatus} object indicating if native libraries where found in
  the jar file.
  @throws ApkCreationException if an error occurred
  @throws SealedApkException if the APK is already sealed.
  @throws DuplicateFileException if a file conflicts with another already added to the APK
  at the same location inside the APK archive.