public abstract class BaseCharFilter extends CharFilter
CharFilter
.
You subclass this, and then record mappings by calling
addOffCorrectMap(int, int)
, and then invoke the correct
method to correct an offset.input
Constructor and Description |
---|
BaseCharFilter(Reader in) |
Modifier and Type | Method and Description |
---|---|
protected void |
addOffCorrectMap(int off,
int cumulativeDiff)
Adds an offset correction mapping at the given output stream offset.
|
protected int |
correct(int currentOff)
Retrieve the corrected offset.
|
protected int |
getLastCumulativeDiff() |
close, correctOffset
public BaseCharFilter(Reader in)
protected int correct(int currentOff)
correct
in class CharFilter
protected int getLastCumulativeDiff()
protected void addOffCorrectMap(int off, int cumulativeDiff)
Adds an offset correction mapping at the given output stream offset.
Assumption: the offset given with each successive call to this method will not be smaller than the offset given at the previous invocation.
off
- The output stream offset at which to apply the correctioncumulativeDiff
- The input offset is given by adding this
to the output offsetCopyright © 2000-2019 Apache Software Foundation. All Rights Reserved.