Here you can find the source of loadProperties(InputStream inputStream)
Parameter | Description |
---|---|
inputStream | InputStream to read Properties from |
public static Properties loadProperties(InputStream inputStream)
//package com.java2s; import java.io.InputStream; import java.util.Properties; public class Main { /**/*w ww. j a va 2s.c o m*/ * Read Properties from an InputStream. * * @param inputStream InputStream to read Properties from * @return Properties as read from inputStream */ public static Properties loadProperties(InputStream inputStream) { if (inputStream == null) { return null; } Properties properties = new Properties(); try { properties.load(inputStream); } catch (Exception e) { throw new RuntimeException("Error loading properties from stream", e); } return properties; } }