Here you can find the source of loadProperties(final InputStream io)
Parameter | Description |
---|---|
io | a parameter |
Parameter | Description |
---|---|
IOException | an exception |
public static void loadProperties(final InputStream io) throws IOException
//package com.java2s; /*//from w w w .j av a 2 s . c o m * See COPYING for license information. */ import java.io.IOException; import java.io.InputStream; import java.util.Properties; public class Main { /** * A cache of the properties */ private static Properties props = null; /** * Loads properties from input stream. * * @param io * @throws IOException */ public static void loadProperties(final InputStream io) throws IOException { if (null == io) { throw new IllegalArgumentException("Input stream cannot be null."); } props = new Properties(); props.load(io); } }