public List<String> getAllPropertyNames() { return StreamSupport.stream(Iterables.iterable(properties.propertyNames(), String.class::cast) .spliterator(), false) .collect(toList()); }
public List<String> getAllPropertyNames() { return StreamSupport.stream(Iterables.iterable(properties.propertyNames(), String.class::cast) .spliterator(), false) .collect(toList()); }
public void mergeProperties(Properties properties, boolean override) { for (String key : Iterables.iterable(properties.propertyNames(), String.class::cast)) { String value = properties.getProperty(key); if (override || !getProperties().containsKey(key)) setProperty(key, value); } }
public void mergeProperties(Properties properties, boolean override) { for (String key : Iterables.iterable(properties.propertyNames(), String.class::cast)) { String value = properties.getProperty(key); if (override || !getProperties().containsKey(key)) setProperty(key, value); } }
private void parseZip(ResourcesRepository repo, URI jar, File go) throws IOException, MalformedURLException, URISyntaxException, ZipException { String base = jar.toString() + "!/"; IO.copy(jar.toURL(), go); try (ZipFile zip = new ZipFile(go)) { for (ZipEntry entry : Iterables.iterable(zip.entries())) { String entryName = entry.getName(); if (entryName.endsWith(".jar")) { parse(repo, new URI(base + entryName)); } } } catch (javax.net.ssl.SSLHandshakeException e) { error("Failed to open URL due to ssl verification shit: %s %s", jar, e.getMessage()); } }
private void parseZip(ResourcesRepository repo, URI jar, File go) throws IOException, MalformedURLException, URISyntaxException, ZipException { String base = jar.toString() + "!/"; IO.copy(jar.toURL(), go); try (ZipFile zip = new ZipFile(go)) { for (ZipEntry entry : Iterables.iterable(zip.entries())) { String entryName = entry.getName(); if (entryName.endsWith(".jar")) { parse(repo, new URI(base + entryName)); } } } catch (javax.net.ssl.SSLHandshakeException e) { error("Failed to open URL due to ssl verification shit: %s %s", jar, e.getMessage()); } }
private void readBuildProperties() { try { File f = getFile("build.properties"); if (f.isFile()) { Properties p = loadProperties(f); for (String key : Iterables.iterable(p.propertyNames(), String.class::cast)) { String newkey = key; if (key.indexOf('$') >= 0) { newkey = getReplacer().process(key); } setProperty(newkey, p.getProperty(key)); } } } catch (Exception e) { e.printStackTrace(); } }
private void readBuildProperties() { try { File f = getFile("build.properties"); if (f.isFile()) { Properties p = loadProperties(f); for (String key : Iterables.iterable(p.propertyNames(), String.class::cast)) { String newkey = key; if (key.indexOf('$') >= 0) { newkey = getReplacer().process(key); } setProperty(newkey, p.getProperty(key)); } } } catch (Exception e) { e.printStackTrace(); } }
Properties flattened = new UTF8Properties(); Properties source = domain.getProperties(); for (String key : Iterables.iterable(source.propertyNames(), String.class::cast)) { if (!key.startsWith("_")) { String value = source.getProperty(key);
Properties flattened = new UTF8Properties(); Properties source = domain.getProperties(); for (String key : Iterables.iterable(source.propertyNames(), String.class::cast)) { if (!key.startsWith("_")) { String value = source.getProperty(key);
for (NetworkInterface ni : Iterables.iterable(NetworkInterface.getNetworkInterfaces())) { if (ni == null) continue;
for (String key : Iterables.iterable(p.propertyNames(), String.class::cast)) { String propvalue = p.getProperty(key);
for (NetworkInterface ni : Iterables.iterable(NetworkInterface.getNetworkInterfaces())) { if (ni == null) continue;
private Jar buildFromZip(File file) throws IOException { try { zipFile = new ZipFile(file); for (ZipEntry entry : Iterables.iterable(zipFile.entries())) { if (entry.isDirectory()) { continue; } putResource(entry.getName(), new ZipResource(zipFile, entry), true); } return this; } catch (ZipException e) { IO.close(zipFile); ZipException ze = new ZipException( "The JAR/ZIP file (" + file.getAbsolutePath() + ") seems corrupted, error: " + e.getMessage()); ze.initCause(e); throw ze; } catch (FileNotFoundException e) { IO.close(zipFile); throw new IllegalArgumentException("Problem opening JAR: " + file.getAbsolutePath(), e); } catch (IOException e) { IO.close(zipFile); throw e; } }
for (String key : Iterables.iterable(p.propertyNames(), String.class::cast)) { String propvalue = p.getProperty(key);
private Jar buildFromZip(File file) throws IOException { try { zipFile = new ZipFile(file); for (ZipEntry entry : Iterables.iterable(zipFile.entries())) { if (entry.isDirectory()) { continue; } putResource(entry.getName(), new ZipResource(zipFile, entry), true); } return this; } catch (ZipException e) { IO.close(zipFile); ZipException ze = new ZipException( "The JAR/ZIP file (" + file.getAbsolutePath() + ") seems corrupted, error: " + e.getMessage()); ze.initCause(e); throw ze; } catch (FileNotFoundException e) { IO.close(zipFile); throw new IllegalArgumentException("Problem opening JAR: " + file.getAbsolutePath(), e); } catch (IOException e) { IO.close(zipFile); throw e; } }
.toURL() }, getClass().getClassLoader()); for (URL manifest : Iterables.iterable(cl.getResources("META-INF/MANIFEST.MF"))) { try (InputStream is = manifest.openStream()) { Manifest m = new Manifest(is);
.toURL() }, getClass().getClassLoader()); for (URL manifest : Iterables.iterable(cl.getResources("META-INF/MANIFEST.MF"))) { try (InputStream is = manifest.openStream()) { Manifest m = new Manifest(is);
for (String header : Iterables.iterable(getProperties().propertyNames(), String.class::cast)) { if (header.trim() .length() == 0) {
for (String header : Iterables.iterable(getProperties().propertyNames(), String.class::cast)) { if (header.trim() .length() == 0) {