public abstract class AbstractDetectorStreamProcessorFactory extends Object implements DetectorStreamProcessorFactory
DetectorStreamProcessorFactory
interface.Constructor and Description |
---|
AbstractDetectorStreamProcessorFactory()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
getLookaheadCount()
This method determines the required number of bytes a
DetectorStreamProcessor needs as lookahead
in order to make its decisions. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createProcessor
public AbstractDetectorStreamProcessorFactory()
public int getLookaheadCount()
DetectorStreamProcessor
needs as lookahead
in order to make its decisions. The DetectorStream
will use the maximum
required lookahead of all registered processor-factories
. 1024
. DetectorStreamProcessor
wants to figure out if some file contains
the ASCII-bytes '<?xml' or '<html'. Therefore he requires a lookahead of 5. If he consumes all data
until a '<' is reached (@see ByteIterator.peek()
), he can check if 4 more bytes are
available. In that case he can consume all these bytes and make its decision. Otherwise he returns from
DetectorStreamProcessor.process(DetectorStreamBuffer, java.util.Map, boolean)
and waits for the
next call that will guarantee the buffer is refilled with at least the specified lookahead. getLookaheadCount
in interface DetectorStreamProcessorFactory
Copyright © 2001–2014 mmm-Team. All rights reserved.