public interface DetectorStreamProcessor
DetectorStream
. Such
DetectorStream
holds a chain of DetectorStreamProcessor
s and routes the stream
data through this chain. InputStream
or the caller that
wants to write to the wrapped
OutputStream
). The end of the chain is the consumer of the data (the native
OutputStream
or caller that wants to read from the
wrapped
InputStream
). removing
data from the
stream and/or inserting
new data into the
stream. DetectorStream
,
DetectorStreamProcessorFactory
Modifier and Type | Method and Description |
---|---|
void |
process(DetectorStreamBuffer buffer,
Map<String,Object> metadata,
boolean eos)
This method performs the actual detection and optionally manipulates the data.
|
void process(DetectorStreamBuffer buffer, Map<String,Object> metadata, boolean eos) throws IOException
buffer
that provides access to read buffered parts of the stream. As streams are typically larger pieces of
data, this method will be called repetitive in order to process the entire stream. buffer
whenever it is invoked.
To ensure your implementation can always make an appropriate decision it may have to ensure a specific
lookahead
.buffer
- allows you to read parts of the streamed data as well as to manipulate the data.metadata
- is the Map
with the meta-data.eos
- - true
if the end of the stream has been reached and the given buffer
has to beIOException
- in case of an Input/Output error. Should only be used internally.Copyright © 2001–2016 mmm-Team. All rights reserved.