be.re.repo
Interface Storage
public interface Storage
The interface for storage implementations that wish to store documents
per version. The byte stream they produce is stored in the database. Such
modules are declared in /configuration/maps.xml
using the storage
element as in the following example:
<storage>
<mime-type>application/sgml</mime-type>
<!-- Additional mime-type elements can come here. -->
<!-- Several path elements can come here. -->
<class>
<name>be.re.repo.mod.CompressedStorage</name>
<!-- Optional URL relative to maps.xml.
<jar>modules/my_module.jar</jar>
-->
</class>
</storage>
- Author:
- Werner Donné
Method Summary |
void |
read(String vcr,
String version,
InputStream in,
OutputStream out,
String mimeType,
Context context)
|
InputStream |
read(String vcr,
String version,
InputStream in,
String mimeType,
Context context)
|
void |
write(String vcr,
String version,
InputStream in,
OutputStream out,
String mimeType,
Context context)
|
read
void read(String vcr,
String version,
InputStream in,
OutputStream out,
String mimeType,
Context context)
throws IOException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.in
- the inputstream of the version.out
- the outputstream into which the result should be written. The
contents of this stream is not necessarily the same as what was read from
in
.mimeType
- the MIME type of the document.context
- the repository context.
- Throws:
IOException
read
InputStream read(String vcr,
String version,
InputStream in,
String mimeType,
Context context)
throws IOException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.in
- the inputstream of the version.mimeType
- the MIME type of the document.context
- the repository context.
- Returns:
- The inputstream that wraps
in
and performs a possible
transformation.
- Throws:
IOException
write
void write(String vcr,
String version,
InputStream in,
OutputStream out,
String mimeType,
Context context)
throws IOException
- Parameters:
vcr
- the local path of the VCR.version
- the local path of the version.in
- the inputstream of the version.out
- the outputstream into which the result should be written. The
contents of this stream is not necessarily the same as what was read from
in
.mimeType
- the MIME type of the document.context
- the repository context.
- Throws:
IOException