|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DetectorStreamProvider
This is the interface of a service that provides detector-streams.
Typical usage might look like this (the cast is a little stupid but just to
make it clear):
DetectorStreamProviderprovider = ... OutputStream outStream = ... //writeData(outStream); //outStream.close();DetectorOutputStreamdetectorOutStream = provider.wrap(outStream, detector);OutputStreamwrappedOutStream = detectorOutStream.getStream(); writeData(wrappedOutStream); wrappedOutStream.close();Map<String, Object> metadata = detectorOutStream.getMetadata(); Long bytesWritten = metadata.get("filesize");
| Method Summary | |
|---|---|
DetectorInputStream |
wrapInputStream(InputStream stream)
This method gets a DetectorInputStream that wrapps the given
stream. |
DetectorInputStream |
wrapInputStream(InputStream stream,
Map<String,Object> metadata)
This method gets a DetectorInputStream that wraps the given
stream. |
DetectorOutputStream |
wrapOutputStream(OutputStream stream)
This method gets a DetectorOutputStream that wraps the given
stream. |
DetectorOutputStream |
wrapOutputStream(OutputStream stream,
Map<String,Object> metadata)
This method gets a DetectorOutputStream that wraps the given
stream. |
| Method Detail |
|---|
DetectorInputStream wrapInputStream(InputStream stream)
DetectorInputStream that wrapps the given
stream.
stream - is the stream to wrap. This stream must be a fresh stream
that is untouched since it was opened.
DetectorInputStream wrapInputStream(InputStream stream,
Map<String,Object> metadata)
DetectorInputStream that wraps the given
stream. In addition to wrapInputStream(InputStream)
an additional parameter metadata is supplied. If this context
contains metadata values, that are mutable, the stream wrapper manipulates
the data such that the given values correspond to the data.metadata.metadata.
stream - is the stream to wrap. This stream must be a fresh stream
that is untouched since it was opened.metadata - is the existing metadata to apply.
DetectorOutputStream wrapOutputStream(OutputStream stream)
DetectorOutputStream that wraps the given
stream.
stream - is the stream to wrap. This stream must be a fresh stream
that is untouched since it was opened.
DetectorOutputStream wrapOutputStream(OutputStream stream,
Map<String,Object> metadata)
DetectorOutputStream that wraps the given
stream. In addition to wrapOutputStream(OutputStream)
an additional parameter metadata is supplied. If this context
contains metadata values, that are mutable, the stream wrapper manipulates
the data such that the given values correspond to the data.metadata.metadata.
stream - is the stream to wrap. This stream must be a fresh stream
that is untouched since it was opened.metadata - is the existing metadata to apply.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||