/** * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); try (InputStream in = url.openStream()) { jar = new Jar(url.getFile(), in); } } addClose(jar); return jar; }
/** * @return * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); InputStream in = url.openStream(); try { jar = new Jar(url.getFile(), in); } finally { in.close(); } } addClose(jar); return jar; }
/** * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); try (InputStream in = url.openStream()) { jar = new Jar(url.getFile(), in); } } addClose(jar); return jar; }
/** * @return * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); InputStream in = url.openStream(); try { jar = new Jar(url.getFile(), in); } finally { in.close(); } } addClose(jar); return jar; }
/** * @return * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); InputStream in = url.openStream(); try { jar = new Jar(url.getFile(), in); } finally { in.close(); } } addClose(jar); return jar; }
/** * @return * @throws IOException * @throws MalformedURLException */ protected Jar getJarFromFileOrURL(String spec) throws IOException, MalformedURLException { Jar jar; File jarFile = getFile(spec); if (jarFile.exists()) { jar = new Jar(jarFile); } else { URL url = new URL(spec); InputStream in = url.openStream(); try { jar = new Jar(url.getFile(), in); } finally { in.close(); } } addClose(jar); return jar; }
addClose(jar); return jar;
addClose(jar); return jar;
addClose(jar); return jar;
addClose(jar); return jar;
addClose(jar); return jar;
addClose(jar); return jar;