Class SingleByteReceiver
- java.lang.Object
- 
- org.apache.manifoldcf.connectorcommon.fuzzyml.ByteReceiver
- 
- org.apache.manifoldcf.connectorcommon.fuzzyml.SingleByteReceiver
 
 
- 
- Direct Known Subclasses:
- BOMEncodingDetector
 
 public abstract class SingleByteReceiver extends ByteReceiver This class represents a receiver for a series of single bytes.
- 
- 
Field SummaryFields Modifier and Type Field Description protected byte[]byteBuffer
 - 
Constructor SummaryConstructors Constructor Description SingleByteReceiver(int chunkSize)Constructor
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleandealWithByte(byte b)Receive a byte.booleandealWithBytes(java.io.InputStream inputStream)Read a byte stream and process bytes.protected booleandealWithRemainder(byte[] buffer, int offset, int len, java.io.InputStream inputStream)Deal with the remainder of the input.- 
Methods inherited from class org.apache.manifoldcf.connectorcommon.fuzzyml.ByteReceiverfinishUp
 
- 
 
- 
- 
- 
Method Detail- 
dealWithBytespublic final boolean dealWithBytes(java.io.InputStream inputStream) throws java.io.IOException, ManifoldCFExceptionRead a byte stream and process bytes.- Specified by:
- dealWithBytesin class- ByteReceiver
- Returns:
- true if abort signalled, false if end of stream reached.
- Throws:
- java.io.IOException
- ManifoldCFException
 
 - 
dealWithBytepublic abstract boolean dealWithByte(byte b) throws java.io.IOException, ManifoldCFExceptionReceive a byte.- Returns:
- true to stop further processing.
- Throws:
- java.io.IOException
- ManifoldCFException
 
 - 
dealWithRemainderprotected boolean dealWithRemainder(byte[] buffer, int offset, int len, java.io.InputStream inputStream) throws java.io.IOException, ManifoldCFExceptionDeal with the remainder of the input. This is called only when dealWithByte() 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.
- inputStream- is the stream that should come after the characters in the buffer.
- Returns:
- true to abort, false if the end of the stream has been reached.
- Throws:
- java.io.IOException
- ManifoldCFException
 
 
- 
 
-