public class ResourceFilePropertyIO extends AbstractPropertyIO
classLoader.getResourceAsStream(). ResourceStreamPropertyIO,
ResourceBundlePropertyIO,
Serialized Form| Constructor and Description |
|---|
ResourceFilePropertyIO(Class<?> clazz)
Deprecated.
Constructor with a classname as the resource name.
|
ResourceFilePropertyIO(Class<?> clazz,
boolean useCache)
Deprecated.
Constructor with a classname as the resource name.
|
ResourceFilePropertyIO(String resourceName)
Deprecated.
Constructor with a path and name of the resource.
|
ResourceFilePropertyIO(String resourceName,
boolean cached)
Deprecated.
The constructor for ResourceFilePropertyIO.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getName()
Deprecated.
A short descriptive name of the Property IO.
|
Properties |
getProperties()
Deprecated.
A convenience overload of that uses the current thread's context classloader.
|
protected Properties |
getProperties(String resourceName)
Deprecated.
Loads a resource using
Thread.currentThread().getContextClassLoader().getResourceAsStream(name). |
String |
getResourceName()
Deprecated.
The name of the resource.
|
String |
getSource()
Deprecated.
A detailed description of the source of the property data.
|
void |
reload()
Deprecated.
Reloads the name,value pairs for the PropertyIO, or forces the values to reload when read next time.
|
void |
setValue(String propertyName,
String value)
Deprecated.
Sets the name,value as String in the IO.
|
void |
validate()
Deprecated.
Validates the PropertyIO.
|
backup, getCacheTime, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, getValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritablepublic ResourceFilePropertyIO(String resourceName)
resourceName - the resource name.ResourceFilePropertyIO(String, boolean)public ResourceFilePropertyIO(Class<?> clazz)
clazz - the class to use for loadingNullPointerException - if clazz is null.public ResourceFilePropertyIO(Class<?> clazz, boolean useCache)
clazz - the class to use for loadinguseCache - if the type converted object shall be stored in cached, avoiding repeatly conversions.NullPointerException - if clazz is null.public ResourceFilePropertyIO(String resourceName, boolean cached)
resourceName - cached - if the type converted object shall be stored in cached, avoiding repeatly conversions.public String getResourceName()
public String getName()
PropertyIOpublic String getSource()
PropertyIOpublic void setValue(String propertyName, String value) throws PropertyIOException
PropertyIOpropertyName - the name of the propertyvalue - the string value of the property.PropertyIOException - if the IO is readonly or failed to write the value.public void validate()
throws PropertyIOException
PropertyIOPropertyIOExceptionpublic void reload()
PropertyIOreload in interface PropertyIOreload in class AbstractPropertyIOpublic Properties getProperties()
Propertiesprotected Properties getProperties(String resourceName) throws PropertyIOException
Thread.currentThread().getContextClassLoader().getResourceAsStream(name).resourceName - the name of the resource.PropertyIOException