Java tutorial
//package com.java2s; //License from project: LGPL import java.io.Closeable; import java.io.IOException; import java.io.InputStream; import java.util.Properties; import java.util.zip.ZipFile; public class Main { public static Properties readProperties(InputStream input) { Properties properties = new Properties(); return readProperties(input, properties) ? properties : null; } public static boolean readProperties(InputStream input, Properties properties) { if (input != null && properties != null) { boolean e; try { properties.load(input); e = true; } catch (IOException var6) { var6.printStackTrace(); return false; } finally { close((Closeable) input); } return e; } else { return false; } } public static void close(Closeable closeable) { if (closeable != null) { try { closeable.close(); } catch (IOException var2) { var2.printStackTrace(); } } } public static void close(ZipFile zip) { if (zip != null) { try { zip.close(); } catch (IOException var2) { var2.printStackTrace(); } } } }