@Test public void testLoadQuietly_InputStream() throws Exception { Properties sample = createTestSample(); byte[] bytes = asByteArray(sample); try (ByteArrayInputStream in = new ByteArrayInputStream(bytes)) { Properties loaded = loadQuietly(in); assertEquals(sample.size(), loaded.size()); } Properties doesNotExist = loadQuietly((InputStream) null); assertEquals(0, doesNotExist.size()); }
public static Properties loadQuietly(final File file) { return loadQuietly(() -> { return new FileInputStream(file); }); }
PropertyHelper { public static Properties loadQuietly(final File file) { return loadQuietly(() -> { return new FileInputStream(file); }); } }
PropertyHelper { public static Properties loadQuietly(final File file) { return loadQuietly(() -> { return new FileInputStream(file); }); }  }
PropertyHelper { public static Properties loadQuietly(final File file) { return loadQuietly(() -> { return new FileInputStream(file); }); }  static Properties getPropertySubset(Properties p, String prefix); static Properties getPropertySubset(Properties p, String prefix, boolean ignoreCase); static String getPropertyIgnoringCase(Properties p, String key, String defaultValue); static Map<String, String> asMap(Properties p); static String getPropertyIgnoringCase(Properties p, String key); static Properties loadQuietly(final File file); static Properties loadQuietly(final String resource); static Properties loadQuietly(final ClassLoader cl, final String resource); static Properties loadQuietly(final URL resource); static Properties loadQuietly(final InputStream in); static Properties loadQuietly(PropertyInputStream e); static Properties load(PropertyInputStream e); }
PropertyHelper { public static Properties loadQuietly(final File file) { return loadQuietly(() -> { return new FileInputStream(file); }); }  static Properties getPropertySubset(Properties p, String prefix); static Properties getPropertySubset(Properties p, String prefix, boolean ignoreCase); static String getPropertyIgnoringCase(Properties p, String key, String defaultValue); static Map<String, String> asMap(Properties p); static String getPropertyIgnoringCase(Properties p, String key); static Properties loadQuietly(final File file); static Properties loadQuietly(final String resource); static Properties loadQuietly(final ClassLoader cl, final String resource); static Properties loadQuietly(final URL resource); static Properties loadQuietly(final InputStream in); static Properties loadQuietly(PropertyInputStream e); static Properties load(PropertyInputStream e);  }