java.util.Properties,
performing standard handling of input streams.
For more configurable properties loading, including the option of a customized encoding, consider using the PropertiesLoaderSupport class.
PropertiesLoaderSupport
| Modifier and Type | Field and Description |
|---|---|
| private static final String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static void | fillProperties(Properties
the Properties instance to load into props, EncodedResource the resource to load from resource)Fill the given properties from the given EncodedResource, potentially defining a specific encoding for the properties file. |
| pack-priv static void | fillProperties(Properties
the Properties instance to load into props, EncodedResource the resource to load from resource, PropertiesPersister the PropertiesPersister to use persister)Actually load properties from the given EncodedResource into the given Properties instance. |
| public static void | fillProperties(Properties
the Properties instance to fill props, Resource the resource to load from resource)Fill the given properties from the given resource (in ISO-8859-1 encoding). |
| public static Properties | Returns: the populated Properties instancethe name of the class path resource resourceName)Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the default class loader. |
| public static Properties | Returns: the populated Properties instancethe name of the class path resource resourceName, ClassLoader the ClassLoader to use for loading
(or classLoader)null to use the default class loader)Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the given class loader. |
| public static Properties | loadProperties(EncodedResource resource)
Load properties from the given EncodedResource, potentially defining a specific encoding for the properties file. |
| public static Properties | Returns: the populated Properties instancethe resource to load from resource)Load properties from the given resource (in ISO-8859-1 encoding). |
| XML_FILE_EXTENSION | back to summary |
|---|---|
| private static final String XML_FILE_EXTENSION | |
| PropertiesLoaderUtils | back to summary |
|---|---|
| public PropertiesLoaderUtils() | |
| fillProperties | back to summary |
|---|---|
| public static void fillProperties(Properties props, EncodedResource resource) throws IOException Fill the given properties from the given EncodedResource, potentially defining a specific encoding for the properties file.
| |
| fillProperties | back to summary |
|---|---|
| pack-priv static void fillProperties(Properties props, EncodedResource resource, PropertiesPersister persister) throws IOException Actually load properties from the given EncodedResource into the given Properties instance.
| |
| fillProperties | back to summary |
|---|---|
| public static void fillProperties(Properties props, Resource resource) throws IOException Fill the given properties from the given resource (in ISO-8859-1 encoding).
| |
| loadAllProperties | back to summary |
|---|---|
| public static Properties loadAllProperties(String resourceName) throws IOException Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the default class loader. Merges properties if more than one resource of the same name found in the class path.
| |
| loadAllProperties | back to summary |
|---|---|
| public static Properties loadAllProperties(String resourceName, ClassLoader classLoader) throws IOException Load all properties from the specified class path resource (in ISO-8859-1 encoding), using the given class loader. Merges properties if more than one resource of the same name found in the class path.
| |
| loadProperties | back to summary |
|---|---|
| public static Properties loadProperties(EncodedResource resource) throws IOException Load properties from the given EncodedResource, potentially defining a specific encoding for the properties file. | |
| loadProperties | back to summary |
|---|---|
| public static Properties loadProperties(Resource resource) throws IOException Load properties from the given resource (in ISO-8859-1 encoding).
| |