public class PropertyUtils extends Object
| Constructor and Description |
|---|
PropertyUtils()
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
static Properties |
loadOptionalProperties(File file)
Loads
Properties from a given File. |
static Properties |
loadOptionalProperties(InputStream inputStream)
Loads
Properties from a given InputStream. |
static Properties |
loadOptionalProperties(URL url)
Loads
Properties from a given URL. |
static Properties |
loadProperties(File file)
Deprecated.
As of 3.1.0, please use method
loadOptionalProperties(java.io.File). This method should not
be used as it suppresses exceptions silently when loading properties fails and returns null instead of an
empty Properties instance when the given File is null. |
static Properties |
loadProperties(InputStream is)
Deprecated.
As of 3.1.0, please use method
loadOptionalProperties(java.io.InputStream). This method
should not be used as it suppresses exceptions silently when loading properties fails. |
static Properties |
loadProperties(URL url)
Deprecated.
As of 3.1.0, please use method
loadOptionalProperties(java.net.URL). This method should not
be used as it suppresses exceptions silently when loading properties fails and returns null instead of an
empty Properties instance when the given URL is null. |
@Deprecated public static Properties loadProperties(@Nonnull URL url)
loadOptionalProperties(java.net.URL). This method should not
be used as it suppresses exceptions silently when loading properties fails and returns null instead of an
empty Properties instance when the given URL is null.url - The URL which should be used to load the properties.@Deprecated public static Properties loadProperties(@Nonnull File file)
loadOptionalProperties(java.io.File). This method should not
be used as it suppresses exceptions silently when loading properties fails and returns null instead of an
empty Properties instance when the given File is null.file - The file from which the properties will be loaded.@Deprecated public static Properties loadProperties(@Nullable InputStream is)
loadOptionalProperties(java.io.InputStream). This method
should not be used as it suppresses exceptions silently when loading properties fails.is - InputStream@Nonnull public static Properties loadOptionalProperties(@Nullable URL url)
Properties from a given URL.
If the given URL is not null, it is asserted to represent a valid and loadable properties
resource.
url - The URL of the properties resource to load or null.Properties instance if url is null.@Nonnull public static Properties loadOptionalProperties(@Nullable File file)
Properties from a given File.
If the given File is not null, it is asserted to represent a valid and loadable properties
resource.
file - The File of the properties resource to load or null.Properties instance if file is null.@Nonnull public static Properties loadOptionalProperties(@Nullable InputStream inputStream)
Properties from a given InputStream.
If the given InputStream is not null, it is asserted to represent a valid and loadable properties
resource.
inputStream - The InputStream of the properties resource to load or null.Properties instance if inputStream is null.Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.