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

PropertiesloadProperties(Class aClass, String aFileName, InputStream aResourceAsStream)
load Properties
try {
    try {
        Properties tProperties = new Properties();
        tProperties.load(aResourceAsStream);
        return tProperties;
    } finally {
        aResourceAsStream.close();
} catch (IOException e) {
    throw new RuntimeException(e);
PropertiesloadProperties(final InputStream in)
load Properties
final Properties props = new Properties();
try {
    props.load(in);
} finally {
    in.close();
return props;
voidloadProperties(final InputStream io)
Loads properties from input stream.
if (null == io) {
    throw new IllegalArgumentException("Input stream cannot be null.");
props = new Properties();
props.load(io);
PropertiesloadProperties(final Properties properies, final InputStream inputStream)
load Properties
try {
    properies.load(inputStream);
    return properies;
} finally {
    inputStream.close();
PropertiesloadProperties(InputStream input)
load Properties
InputStreamReader reader;
Properties props = new Properties();
try {
    reader = new InputStreamReader(input, "utf8");
    props.load(reader);
} catch (Exception e) {
    e.printStackTrace();
    return null;
...
PropertiesloadProperties(InputStream input)
load Properties
Properties props = new Properties();
props.load(input);
return props;
PropertiesloadProperties(InputStream inputStream)
load Properties
Properties props = new Properties();
if (inputStream != null) {
    try {
        props.load(inputStream);
    } finally {
        inputStream.close();
return props;
PropertiesloadProperties(InputStream inputStream)
Read Properties from an 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);
...
PropertiesloadProperties(InputStream inputStream)
load Properties
Properties properties = new Properties();
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream));
while (true) {
    String line = in.readLine();
    if (line == null)
        return properties;
    if (line.length() > 0) {
        int len = line.length();
...
voidloadProperties(InputStream inputStream, Properties result)
ADD THIS METHOD FOR TESTING WITH ECLIPSE 3.5
InputStream input = null;
try {
    input = new BufferedInputStream(inputStream);
    result.load(input);
} finally {
    if (input != null) {
        input.close();
        input = null;
...