Skip to content

Instantly share code, notes, and snippets.

@nebhale
Created November 14, 2009 09:23
Show Gist options
  • Save nebhale/234456 to your computer and use it in GitHub Desktop.
Save nebhale/234456 to your computer and use it in GitHub Desktop.
private void writeManifest(JarOutputStream out, BundleManifest manifest) throws IOException {
out.putNextEntry(new JarEntry("META-INF/"));
out.write(new byte[0]);
out.flush();
out.closeEntry();
out.putNextEntry(new JarEntry(JarFile.MANIFEST_NAME));
manifest.write(new OutputStreamWriter(out));
out.flush();
out.closeEntry();
// Throws exception because BundleManifest already closed the writer it was passed in
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment