try {
JarOutputStream jar = new JarOutputStream(new FileOutputStream(outFile));
int idx = resource.indexOf('/');
while (idx > 0) {
jar.putNextEntry(new ZipEntry(resource.substring(0, idx)));
jar.closeEntry();
idx = resource.indexOf('/', idx + 1);
}
jar.putNextEntry(new ZipEntry(resource));
int c;
while ((c = is.read()) >= 0) {