List of usage examples for java.util.jar JarEntry JarEntry
public JarEntry(JarEntry je)
JarEntry
with fields taken from the specified JarEntry
object. From source file:rubah.tools.ConversionClassGenerator.java
public void addConversionClassesToJar(JarOutputStream jos, Clazz cl) throws IOException { jos.putNextEntry(new JarEntry(this.getType(cl).getInternalName() + ".class")); IOUtils.write(this.getClassBytes(cl), jos); }
From source file:rubah.tools.ReadWriteTool.java
protected void addFileToOutJar(String name, byte[] bytes) { JarEntry entry = new JarEntry(name); try {//from w w w.j ava2 s . c om this.outJarStream.putNextEntry(entry); if (bytes != null) { this.outJarStream.write(bytes, 0, bytes.length); } this.outJarStream.closeEntry(); } catch (IOException e) { throw new Error(e); } }