Java Utililty Methods Properties Load from InputStream

List of utility methods to do Properties Load from InputStream

Description

The list of methods to do Properties Load from InputStream are organized into topic(s).

Method

MaploadProperties(InputStream stream)
Reads a property list using the Properties#load(InputStream) method.
Properties properties = new Properties();
properties.load(stream);
return toMap(properties);
voidloadProperties(Properties props, InputStream inputStream)
Convenience method used to load properties from the given file.
try {
    InputStreamReader reader = new InputStreamReader(inputStream, "UTF-8");
    props.load(reader);
} catch (FileNotFoundException fnfe) {
    System.out.println("Unable to find properties file" + fnfe);
} catch (UnsupportedEncodingException uee) {
    System.out.println("Unsupported encoding used in properties file" + uee);
} catch (IOException ioe) {
...
PropertiesloadPropertiesFileFromStream(InputStream stream)
Methode de chargement d'un fichier de proprietes a partir d'un stream
if (stream == null)
    throw new RuntimeException("Erreur lors du chargement du fichier de proprietes: Le stream est null");
Properties properties = new Properties();
try {
    properties.load(new InputStreamReader(stream));
} catch (IOException e) {
    closeStream(stream);
    throw new RuntimeException("Erreur lors du chargement du fichier de proprietes", e);
...
PropertiesloadPropertiesFromStream(InputStream inputStream)
load Properties From Stream
try {
    Properties rtn = new Properties();
    rtn.load(inputStream);
    return rtn;
} catch (IOException ex) {
    throw new RuntimeException(ex);
MaploadPropertiesInputStreamToMap(InputStream propertiesInputStream)
load Properties Input Stream To Map
Properties properties = new Properties();
properties.load(propertiesInputStream);
return propertiesToMap(properties);
PropertiesloadPropertiesStream(InputStream input)
load Properties Stream
Properties prop = new Properties();
prop.load(input);
return prop;