T
- Properties
or a subclass like SortedProperties
.public abstract class AbstractPropertiesFactory<T extends java.util.Properties>
extends java.lang.Object
Properties
Modifier and Type | Method and Description |
---|---|
T |
load(java.lang.ClassLoader classLoader,
java.lang.String name)
Creates and loads properties from the given file.
|
T |
load(java.io.File file)
Creates and loads properties from the given file.
|
T |
load(java.io.InputStream inputStream)
Creates and loads properties from the given input stream.
|
T |
load(java.nio.file.Path path)
Creates and loads properties from the given path.
|
T |
load(java.io.Reader reader)
Creates and loads properties from the given reader.
|
T |
load(java.lang.String name)
Creates and loads properties from the given file name.
|
T |
load(java.net.URI uri)
Creates and loads properties from the given URI.
|
T |
load(java.net.URL url)
Creates and loads properties from the given URL.
|
public T load(java.lang.ClassLoader classLoader, java.lang.String name) throws java.io.IOException
classLoader
- the class loader to use to get the named resource.name
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.io.File file) throws java.io.FileNotFoundException, java.io.IOException
file
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.java.io.FileNotFoundException
- Thrown if the file does not exist, is a directory, or cannot be opened for
reading.java.lang.SecurityException
- Thrown if a security manager's checkRead
method denies read access to
the file.public T load(java.io.InputStream inputStream) throws java.io.IOException
inputStream
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.nio.file.Path path) throws java.io.IOException
path
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.io.Reader reader) throws java.io.IOException
reader
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.lang.String name) throws java.io.IOException
name
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.net.URI uri) throws java.io.IOException
uri
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.public T load(java.net.URL url) throws java.io.IOException
url
- the location of the properties file.java.io.IOException
- Thrown if an error occurred reading the input stream.java.lang.IllegalArgumentException
- Thrown if the input contains a malformed Unicode escape sequence.Copyright © 2010 - 2023 Adobe. All Rights Reserved