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 boolean
dealWithCharacter(char c)
Receive a byte.boolean
dealWithCharacters(java.io.Reader reader)
Receive a stream of characters.protected boolean
dealWithRemainder(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, ManifoldCFException
Receive a stream of characters.- Specified by:
dealWithCharacters
in classCharacterReceiver
- Returns:
- true if abort signalled, false if end of stream.
- Throws:
java.io.IOException
ManifoldCFException
-
dealWithCharacter
public abstract boolean dealWithCharacter(char c) throws java.io.IOException, ManifoldCFException
Receive a byte.- Returns:
- true if done.
- Throws:
java.io.IOException
ManifoldCFException
-
dealWithRemainder
protected boolean dealWithRemainder(char[] buffer, int offset, int len, java.io.Reader reader) throws java.io.IOException, ManifoldCFException
Deal 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.IOException
ManifoldCFException
-
-