code: public Collection<VoidChunk> split(@NonNull VoidMessage message, int maxBytes) throws IOException {
          if (maxBytes <= 0)
              throw new ND4JIllegalStateException("MaxBytes must be > 0");
  
          val tempFile = ND4JFileUtils.createTempFile("messageSplitter","temp");
          val result = new ArrayList<VoidChunk>();
  
          try (val fos = new FileOutputStream(tempFile); val bos = new BufferedOutputStream(fos)) {
              // serializing original message to disc
              SerializationUtils.serialize(message, fos);
  
              val length = tempFile.length();
              int numChunks = (int) (length /  maxBytes + (length % maxBytes > 0 ? 1 : 0));
              try (val fis = new FileInputStream(tempFile); val bis = new BufferedInputStream(fis)) {
                  // now we'll be reading serialized message into
                  val bytes = new byte[maxBytes];
                  int cnt = 0;
                  int id = 0;
  
                  while (cnt < length) {
                      val c = bis.read(bytes);
  
                      val tmp = Arrays.copyOf(bytes, c);
  
                      // FIXME: we don't really want UUID used here, it's just a placeholder for now
                      val msg = VoidChunk.builder()
                              .messageId(java.util.UUID.randomUUID().toString())
                              .originalId(message.getMessageId())
                              .chunkId(id++)
                              .numberOfChunks(numChunks)
                              .splitSize(maxBytes)
                              .payload(tmp)
                              .totalSize(length)
                              .build();
  
                      result.add(msg);
                      cnt += c;
                  }
              }
          }
  
          tempFile.delete();
          return result;
      }
docs: This method splits VoidMessage into chunks, and returns them as Collection
  @param message
  @return