-
public interface DataSplitter
-
-
Method Summary
Modifier and Type Method Description abstract Array<byte>chunk(@NonNull() Array<byte> message, @IntRange(from = 0) int index, @IntRange(from = 20) 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. -
-
Method Detail
-
chunk
@Nullable() abstract Array<byte> chunk(@NonNull() Array<byte> message, @IntRange(from = 0) int index, @IntRange(from = 20) 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.
- Parameters:
message- the full message to be chunk.index- index of a packet, 0-based.maxLength- maximum length of the returned packet.
-
-
-
-