de.spieleck.app.jacson.filter
Class HeadFilter
java.lang.Object
de.spieleck.app.jacson.PluginBase
de.spieleck.app.jacson.filter.FilterBase
de.spieleck.app.jacson.filter.ConstFilter
de.spieleck.app.jacson.filter.HeadFilter
- All Implemented Interfaces:
- ConfigVerify.Acceptor, FilterNames, JacsonChunkDrain, JacsonFilter, JacsonRegistrable, JacsonReporting, JacsonStately
- public class HeadFilter
- extends ConstFilter
Filter to let through only the first few chunks.
(or all but the first few with inverse).
- Author:
- fsn
Field Summary |
protected int |
count
Count of input chunks. |
static java.lang.String |
COUNT_NODE
|
protected int |
head
number of chunks to be treated. |
protected boolean |
reset
Reset with a null chunk? |
static java.lang.String |
RESET_NODE
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COUNT_NODE
public static final java.lang.String COUNT_NODE
- See Also:
- Constant Field Values
RESET_NODE
public static final java.lang.String RESET_NODE
- See Also:
- Constant Field Values
head
protected int head
- number of chunks to be treated.
count
protected int count
- Count of input chunks.
reset
protected boolean reset
- Reset with a null chunk? default=true
HeadFilter
public HeadFilter()
init
public void init(ConfigNode config,
JacsonRegistry registry)
throws JacsonConfigException
- Specified by:
init
in interface JacsonRegistrable
- Overrides:
init
in class ConstFilter
- Throws:
JacsonConfigException
accept
public boolean accept(ConfigNode node)
- Specified by:
accept
in interface ConfigVerify.Acceptor
- Overrides:
accept
in class ConstFilter
putChunk
public void putChunk(java.lang.String chunk)
throws JacsonException
- Description copied from interface:
JacsonChunkDrain
- Feed a single chunk into this filter
- Specified by:
putChunk
in interface JacsonChunkDrain
- Overrides:
putChunk
in class ConstFilter
- Throws:
JacsonException
Copyleft 2002 spieleck.de.