Class SeekableMatcherForByte
java.lang.Object
org.aksw.commons.io.seekable.impl.SeekableMatcherForByte
- All Implemented Interfaces:
SeekableMatcher
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanMove the position to the next match.booleanWhether the matcher matches in forward direction and thus nextPos() moves towards the end of the match.voidReset the state of the matcher such that it can be used with a fresh seekable
-
Field Details
-
delimiter
protected byte delimiterThe byte which to match -
isFwd
protected boolean isFwd -
toLower
protected boolean toLower
-
-
Constructor Details
-
SeekableMatcherForByte
public SeekableMatcherForByte(byte delimiter, boolean isFwd, boolean toLower)
-
-
Method Details
-
isForward
public boolean isForward()Description copied from interface:SeekableMatcherWhether the matcher matches in forward direction and thus nextPos() moves towards the end of the match. If false, prevPos() moves towards the end of the match- Specified by:
isForwardin interfaceSeekableMatcher- Returns:
-
resetState
public void resetState()Description copied from interface:SeekableMatcherReset the state of the matcher such that it can be used with a fresh seekable- Specified by:
resetStatein interfaceSeekableMatcher
-
find
Description copied from interface:SeekableMatcherMove the position to the next match. Position is unspecified if no match was found. TODO Add a horizon argument to limit scanning in case of infinite streams- Specified by:
findin interfaceSeekableMatcher- Returns:
- true if a match was found, false otherwise
- Throws:
IOException
-