How to split a ByteArray into chunks of byteArray in java, each chunk has a size of 1024 byte or less, then a method to collect each chunk into Bytearray. I\'m working with offl