public interface PersistenceStrategy
This interface should not be used to obtain an arbitrary instance, as implementations may
greatly vary, and no data validation is performed to alert the consumer of the service what is or
is not supported. Filter results using the STRATEGY_EXTENSION
service property.
This interface is for internal use only.
This code is experimental. While this interface is functional and tested, it may change or be removed in a future version of the library.
Modifier and Type | Field and Description |
---|---|
static String |
STRATEGY_EXTENSION
Service property key to get the file extension a particular strategy can operate upon.
|
Modifier and Type | Method and Description |
---|---|
String |
getExtension()
Gets the extension handled by this strategy.
|
Dictionary<String,Object> |
read(InputStream inputStream)
Reads the configuration properties from an
InputStream . |
void |
write(OutputStream outputStream,
Dictionary<String,Object> properties)
Writes the configuration properties to an
OutputStream . |
static final String STRATEGY_EXTENSION
String getExtension()
.
) handled by this strategyDictionary<String,Object> read(InputStream inputStream) throws IOException
InputStream
. The stream will not be
closed automatically.inputStream
- input stream where the properties will be read fromIOException
- thrown if the properties couldn't be readvoid write(OutputStream outputStream, Dictionary<String,Object> properties) throws IOException
OutputStream
. The stream will not be
closed automatically.outputStream
- output stream where the properties will be writtenproperties
- properties to writeIOException
- thrown if the properties couldn't be writtenThis work is licensed under a Creative Commons Attribution 4.0 International License.