public interface DetectorStreamProvider
detector-streams
. DetectorStreamProvider
provider = ... OutputStream outStream = ... //writeData(outStream); //outStream.close();DetectorOutputStream
detectorOutStream = provider.wrap(outStream, detector);OutputStream
wrappedOutStream = detectorOutStream.getStream()
; writeData(wrappedOutStream); wrappedOutStream.close();Map
<String, Object> metadata = detectorOutStream.getMetadata()
; Long bytesWritten = metadata.get
("filesize");
Modifier and Type | Method and Description |
---|---|
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 . |
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.Copyright © 2001–2016 mmm-Team. All rights reserved.