Class AbstractPropertiesFactory<T extends Properties>
java.lang.Object
org.apache.commons.collections4.properties.AbstractPropertiesFactory<T>
- Type Parameters:
- T-- Propertiesor a subclass like- SortedProperties.
- Direct Known Subclasses:
- OrderedPropertiesFactory,- PropertiesFactory,- SortedPropertiesFactory
- Since:
- 4.4
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumEnumerates property formats.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected abstract TSubclasses override to provide customized properties instances.Creates and loads properties from the given file.load(InputStream inputStream) Creates and loads properties from the given input stream.load(InputStream inputStream, AbstractPropertiesFactory.PropertyFormat propertyFormat) Creates and loads properties from the given input stream.Creates and loads properties from the given reader.load(ClassLoader classLoader, String name) Creates and loads properties from the given file.Creates and loads properties from the given file name.Creates and loads properties from the given URI.Creates and loads properties from the given URL.Creates and loads properties from the given path.
- 
Constructor Details- 
AbstractPropertiesFactoryprotected AbstractPropertiesFactory()Constructs an instance.
 
- 
- 
Method Details- 
createPropertiesSubclasses override to provide customized properties instances.- Returns:
- a new Properties instance.
 
- 
loadCreates and loads properties from the given file.- Parameters:
- classLoader- the class loader to use to get the named resource.
- name- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadCreates and loads properties from the given file.- Parameters:
- file- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
- FileNotFoundException- Thrown if the file does not exist, is a directory, or cannot be opened for reading.
- SecurityException- Thrown if a security manager's- checkReadmethod denies read access to the file.
 
- 
loadCreates and loads properties from the given input stream.- Parameters:
- inputStream- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadpublic T load(InputStream inputStream, AbstractPropertiesFactory.PropertyFormat propertyFormat) throws IOException Creates and loads properties from the given input stream.- Parameters:
- inputStream- the location of the properties file.
- propertyFormat- The format of the given file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
- Since:
- 4.5.0-M1
 
- 
loadCreates and loads properties from the given path.- Parameters:
- path- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadCreates and loads properties from the given reader.- Parameters:
- reader- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadCreates and loads properties from the given file name.- Parameters:
- name- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadCreates and loads properties from the given URI.- Parameters:
- uri- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
- 
loadCreates and loads properties from the given URL.- Parameters:
- url- the location of the properties file.
- Returns:
- a new properties object.
- Throws:
- IOException- Thrown if an error occurred reading the input stream.
- IllegalArgumentException- Thrown if the input contains a malformed Unicode escape sequence.
 
 
-