public class ResourceLoader extends Object
Modifier and Type | Method and Description |
---|---|
static Properties |
loadProperties(String resourceName,
boolean failIfNotFound)
This will attempt to load the resource given the resource name.
|
static Properties |
loadProperties(String resourceName,
Properties defaults)
This will attempt to load the resource given the resource name.
|
static InputStream |
loadResource(String resourceName)
This will attempt to load the resource given the resource name.
|
public static InputStream loadResource(String resourceName) throws IOException
resourceName
- The resource to try and load.IOException
- If there is an error while attempting to load the resource.public static Properties loadProperties(String resourceName, boolean failIfNotFound) throws IOException
resourceName
- The resource to try and load.failIfNotFound
- Throw an error message if the properties were not found.IOException
- If there is an error loading the properties.public static Properties loadProperties(String resourceName, Properties defaults) throws IOException
resourceName
- The resource to try and load.defaults
- A stream of default properties.IOException
- If there is an error loading the properties.Copyright © 2002-2016 The Apache Software Foundation. All Rights Reserved.