public class PropertiesSet extends Object
Properties
collections.Constructor and Description |
---|
PropertiesSet() |
Modifier and Type | Method and Description |
---|---|
void |
clear()
Clears all properties collections from this set, resulting in an
empty set.
|
String |
getProperty(String name)
Gets a property value from the set.
|
void |
load(Enumeration<URL> locations)
Loads the properties collections found at each of the URLs
in the given enumeration into this set.
|
void |
load(InputStream inputStream)
Loads a properties collection into this set.
|
void |
load(URL location)
Loads a properties collection into this set.
|
public String getProperty(String name)
The properties collections in this set are consulted, in the order added, in order to locate a value for the given property.
name
- name of the property to obtainnull
if no properties collection
in this set contains a property with the given namepublic void load(InputStream inputStream) throws IOException
inputStream
- input stream from which the collection will be readIOException
- if an error occurs in loading the propertiespublic void load(URL location) throws IOException
location
- location of the collection to loadIOException
- if an error occurs in loading the propertiespublic void load(Enumeration<URL> locations) throws IOException
locations
- locations of the properties collections to load into
the setIOException
- if an error occurs in loading the propertiespublic void clear()
Copyright © 2014–2016. All rights reserved.