public interface DataSplitter
| Modifier and Type | Method and Description |
|---|---|
byte[] |
chunk(byte[] message,
int index,
int maxLength)
The implementation should return a index'th byte array from given message,
with at most maxLength size, or null if no bytes are left to be sent.
|
@Nullable
byte[] chunk(@NonNull
byte[] message,
int index,
int maxLength)
message - the full message to be chunk.index - index of a packet, 0-based.maxLength - maximum length of the returned packet. Equals to MTU-3.
Use BleManager.requestMtu(int) to request
higher MTU, or BleManager.overrideMtu(int)
If the MTU change was initiated by the target device.