Object
DelimiterMessageScanner
- All Implemented Interfaces:
MessageScanner
- Direct Known Subclasses:
NewLineMessageScanner
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
-
Method Summary
-
Constructor Details
-
DelimiterMessageScanner
public DelimiterMessageScanner(byte delim) - Parameters:
delim
- delimiter character (for UTF-8 characters use conversion for example for ';' use (byte)';')
-
-
Method Details
-
scan
- 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.
-