public abstract class AbstractXMLInputStreamPropertyIO extends AbstractPropertyIO
setValue
method throws an exception.InputStream
,
Serialized FormConstructor and Description |
---|
AbstractXMLInputStreamPropertyIO(InputStream inputStream)
Constructor, set readonly and cache to
true . |
Modifier and Type | Method and Description |
---|---|
long |
getCacheTime()
How often the typed value cache for a PropertyIO should be automatically flushed every X milliseconds.
|
protected InputStream |
getInputStream()
The inputstream the PropertyIO was constructed with.
|
Properties |
getProperties()
Gets all the name,value pair in a Properties class instance.
|
String |
getSource()
A detailed description of the source of the property data.
|
protected abstract Properties |
loadXml(Document document)
Loads the properties from the XML file.
|
void |
reload()
Reloads the name,value pairs for the PropertyIO, or forces the values to reload when read next time.
|
void |
setValue(String propertyName,
String value)
Sets the name,value as String in the IO.
|
void |
validate()
Validates the PropertyIO.
|
backup, getLastLoaded, getLastSaved, getLogger, getTypedProperties, getTypedValue, getValue, isCached, isReadonly, logPerformanceGetProperties, logPerformanceSetValue, setCacheTime, storeTypedValue, updateLastLoaded, updateLastSaved, validateWritable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public AbstractXMLInputStreamPropertyIO(InputStream inputStream)
true
.inputStream
- the input stream.protected final InputStream getInputStream()
public void setValue(String propertyName, String value) throws PropertyIOException
PropertyIO
propertyName
- 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
PropertyIO
PropertyIOException
protected abstract Properties loadXml(Document document) throws PropertyIOException
document
- the DOM structure.PropertyIOException
- if any failure loading the properties.public Properties getProperties()
PropertyIO
Properties
public void reload()
PropertyIO
reload
in interface PropertyIO
reload
in class AbstractPropertyIO
public String getSource()
PropertyIO
public final long getCacheTime()
AbstractPropertyIO
getCacheTime
in interface PropertyIO
getCacheTime
in class AbstractPropertyIO
PropertyIO.reload()