List of usage examples for java.util.jar JarInputStream read
public int read() throws IOException
From source file:org.apache.openjpa.eclipse.PluginLibrary.java
void copyJar(JarInputStream jar, JarOutputStream out) throws IOException { if (jar == null || out == null) return;//from ww w . ja v a2 s.com try { JarEntry entry = null; while ((entry = jar.getNextJarEntry()) != null) { out.putNextEntry(entry); int b = -1; while ((b = jar.read()) != -1) { out.write(b); } } out.closeEntry(); } finally { out.finish(); out.flush(); out.close(); jar.close(); } }