- Object
-
- DelimiterMessageScanner
-
- All Implemented Interfaces:
MessageScanner
- Direct Known Subclasses:
NewLineMessageScanner
public class DelimiterMessageScanner extends Object implements MessageScanner
Scanner for messages where each message is represented as a single line ending with some delimiter char (ex. ';'). The delimiter is not considered as part of the message.
-
-
Constructor Summary
Constructors Constructor Description DelimiterMessageScanner(byte delim)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
scan(ByteBuffer buf)
-
-
-
Method Detail
-
scan
public int scan(ByteBuffer buf)
- Specified by:
scan
in interfaceMessageScanner
- Returns:
- message end position or -1 if message is not complete or not found in the buffer yet. If last byte of the message found on position n then the message end position will be considered as n + 1.
-
-