public interface DataMerger
| Modifier and Type | Method and Description |
|---|---|
boolean |
merge(DataStream output,
byte[] lastPacket,
int index)
This method should merge the last packet into the output message.
|
boolean merge(@NonNull
DataStream output,
@Nullable
byte[] lastPacket,
int index)
output - the stream for the output message, initially empty.lastPacket - the data received in the last read/notify/indicate operation.index - an index of the packet, 0-based (if you expect 3 packets, they will be
called with indexes 0, 1, 2).