properties.load(inStream);
} finally {
inStream.close();
}
} catch (IOException e) {
throw new UncheckedIOException(e);
}
Map<String, String> map = new HashMap<String, String>();
for (Object key : properties.keySet()) {
map.put(key.toString(), properties.getProperty(key.toString()));
}