public InputStream openInputStream() throws Exception { ByteArrayOutputStream out = new ByteArrayOutputStream(); write(out); out.close(); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); return in; }
private void noSuchFile(Jar jar, String clause, Map<String, String> extra, String source, String destinationPath) throws Exception { Jar src = getJarFromName(source, "Include-Resource " + source); if (src != null) { JarResource jarResource = new JarResource(src); jar.putResource(destinationPath, jarResource); } else { Resource lastChance = make.process(source); if (lastChance != null) { String x = extra.get("extra"); if (x != null) lastChance.setExtra(x); jar.putResource(destinationPath, lastChance); } else error("Input file does not exist: " + source); } }
private void noSuchFile(Jar jar, String clause, Map<String, String> extra, String source, String destinationPath) throws Exception { Jar src = getJarFromName(source, "Include-Resource " + source); if (src != null) { JarResource jarResource = new JarResource(src); jar.putResource(destinationPath, jarResource); } else { Resource lastChance = make.process(source); if (lastChance != null) { String x = extra.get("extra"); if (x != null) lastChance.setExtra(x); jar.putResource(destinationPath, lastChance); } else error("Input file does not exist: " + source); } }
addClose(jar); String path = "WEB-INF/lib/" + f.getName(); dot.putResource(path, new JarResource(jar)); setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH), path));
public InputStream openInputStream() throws IOException { ByteArrayOutputStream out = new ByteArrayOutputStream(); write(out); out.close(); ByteArrayInputStream in = new ByteArrayInputStream(out.toByteArray()); return in; }
return new JarResource(jar); } else return null;
Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar");
Jar javadoc = javadoc(jdoc, project, exports.keySet()); project.progress("Writing javadoc jar"); File javadocFile = write(tmp, new JarResource(javadoc), "javadoc.jar"); project.progress("Writing main file"); File mainFile = write(tmp, new JarResource(main), "main.jar"); project.progress("Writing sources file"); File srcFile = write(tmp, new JarResource(main), "src.jar");
return new JarResource(jar); } else return null;