Class SingleCharacterReceiver
- java.lang.Object
-
- org.apache.manifoldcf.connectorcommon.fuzzyml.CharacterReceiver
-
- org.apache.manifoldcf.connectorcommon.fuzzyml.SingleCharacterReceiver
-
- Direct Known Subclasses:
TagParseState
public abstract class SingleCharacterReceiver extends CharacterReceiver
This interface represents a receiver for a sequence of individual characters.
-
-
Field Summary
Fields Modifier and Type Field Description protected char[]charBuffer
-
Constructor Summary
Constructors Constructor Description SingleCharacterReceiver(int chunkSize)Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleandealWithCharacter(char c)Receive a byte.booleandealWithCharacters(java.io.Reader reader)Receive a stream of characters.protected booleandealWithRemainder(char[] buffer, int offset, int len, java.io.Reader reader)Deal with the remainder of the input.-
Methods inherited from class org.apache.manifoldcf.connectorcommon.fuzzyml.CharacterReceiver
finishUp
-
-
-
-
Method Detail
-
dealWithCharacters
public final boolean dealWithCharacters(java.io.Reader reader) throws java.io.IOException, ManifoldCFExceptionReceive a stream of characters.- Specified by:
dealWithCharactersin classCharacterReceiver- Returns:
- true if abort signalled, false if end of stream.
- Throws:
java.io.IOExceptionManifoldCFException
-
dealWithCharacter
public abstract boolean dealWithCharacter(char c) throws java.io.IOException, ManifoldCFExceptionReceive a byte.- Returns:
- true if done.
- Throws:
java.io.IOExceptionManifoldCFException
-
dealWithRemainder
protected boolean dealWithRemainder(char[] buffer, int offset, int len, java.io.Reader reader) throws java.io.IOException, ManifoldCFExceptionDeal with the remainder of the input. This is called only when dealWithCharacter() returns true.- Parameters:
buffer- is the buffer of characters that should come first.offset- is the offset within the buffer of the first character.len- is the number of characters in the buffer.- Returns:
- true to abort, false if the end of the stream has been reached.
- Throws:
java.io.IOExceptionManifoldCFException
-
-