public class ConfigStrategy extends Object implements PersistenceStrategy
STRATEGY_EXTENSION
Constructor and Description |
---|
ConfigStrategy() |
Modifier and Type | Method and Description |
---|---|
String |
getExtension()
Gets the extension handled by this strategy.
|
Dictionary<String,Object> |
read(InputStream in)
Reads the configuration properties from an
InputStream . |
void |
write(OutputStream out,
Dictionary<String,Object> properties)
Writes the configuration properties to an
OutputStream . |
public String getExtension()
PersistenceStrategy
getExtension
in interface PersistenceStrategy
.
) handled by this strategypublic void write(OutputStream out, Dictionary<String,Object> properties) throws IOException
PersistenceStrategy
OutputStream
. The stream will not be
closed automatically.write
in interface PersistenceStrategy
out
- output stream where the properties will be writtenproperties
- properties to writeIOException
- thrown if the properties couldn't be writtenpublic Dictionary<String,Object> read(InputStream in) throws IOException
PersistenceStrategy
InputStream
. The stream will not be
closed automatically.read
in interface PersistenceStrategy
in
- input stream where the properties will be read fromIOException
- thrown if the properties couldn't be readThis work is licensed under a Creative Commons Attribution 4.0 International License.