public class StreamRepository extends Object implements Repository
| Constructor and Description |
|---|
StreamRepository(InputStream inputStream,
OutputStream outputStream)
Deprecated.
This constructor should not be used, as it hardcodes the filename for the input stream.
Use one of the other constructors instead.
|
StreamRepository(InputStream inputStream,
OutputStream outputStream,
String contentName)
Creates a new repository that potentially allows both read and write access.
|
StreamRepository(InputStream inputStream,
String contentName)
Creates a new read-only repository.
|
StreamRepository(OutputStream outputStream)
Creates a new write-only repository.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getContentName()
Returns the optional content name by which the data in the input-stream should be accessed.
|
WrappedInputStream |
getInputStream()
Returns the optional input stream.
|
MimeRegistry |
getMimeRegistry()
Returns the mime registry for this repository.
|
WrappedOutputStream |
getOutputStream()
Returns the optional output stream.
|
ContentLocation |
getRoot()
Returns the content root of this repository.
|
public StreamRepository(InputStream inputStream, OutputStream outputStream, String contentName)
inputStream - the inputstream from which to read from.outputStream - the output stream to which to write to.contentName - the content name by which the content should be accessed.public StreamRepository(InputStream inputStream, OutputStream outputStream)
inputStream - the input stream from where to read the data (can be null).outputStream - the output stream where data is written to (can be null).public StreamRepository(InputStream inputStream, String contentName)
inputStream - the input stream from where to read the data (can be null).contentName - the content name by which the content should be accessed.public StreamRepository(OutputStream outputStream)
outputStream - the output stream to which to write to.public String getContentName()
public WrappedOutputStream getOutputStream()
public WrappedInputStream getInputStream()
public ContentLocation getRoot()
getRoot in interface Repositorypublic MimeRegistry getMimeRegistry()
getMimeRegistry in interface RepositoryMimeRegistry