Package com.google.code.yanf4j.util
Class ShiftAndByteBufferMatcher
- java.lang.Object
-
- com.google.code.yanf4j.util.ShiftAndByteBufferMatcher
-
- All Implemented Interfaces:
ByteBufferMatcher
public class ShiftAndByteBufferMatcher extends java.lang.Object implements ByteBufferMatcher
ByteBuffer matcher based on shift-and algorithm
-
-
Field Summary
Fields Modifier and Type Field Description private int[]
b
private int
mask
private int
patternLen
private int
patternLimit
private int
patternPos
-
Constructor Summary
Constructors Constructor Description ShiftAndByteBufferMatcher(IoBuffer pat)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<java.lang.Integer>
matchAll(IoBuffer buffer)
int
matchFirst(IoBuffer buffer)
private void
preprocess(IoBuffer pat)
Ԥ����
-
-
-
Constructor Detail
-
ShiftAndByteBufferMatcher
public ShiftAndByteBufferMatcher(IoBuffer pat)
-
-
Method Detail
-
preprocess
private void preprocess(IoBuffer pat)
Ԥ����- Parameters:
pat
-
-
matchAll
public final java.util.List<java.lang.Integer> matchAll(IoBuffer buffer)
- Specified by:
matchAll
in interfaceByteBufferMatcher
-
matchFirst
public final int matchFirst(IoBuffer buffer)
- Specified by:
matchFirst
in interfaceByteBufferMatcher
-
-