Packs previously added files into a single jar archive.
Manifest manifest = new Manifest();
manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, "1.0");
JarOutputStream target = null;
try {
target = new JarOutputStream(
new BufferedOutputStream(new FileOutputStream(pathHolder.getJarFilePath())),
manifest);
add(new File(pathHolder.getDexFilePath()), target);
} catch (IOException e) {
throw new DexClassLoadingException(e);
}
finally {
try {
if (target != null) {
target.close();
}
} catch(IOException e) {
// Ignoring deliberately in order to keep the original exception clear.
}
}