docs: public static final void write(WritableByteChannel ch, byte[] bytes, int offset, int length) throws IOException
      {
          ByteBuffer bb = ByteBuffer.allocate(length);
          bb.put(bytes, offset, length);
          bb.flip();
          writeAll(ch, bb);
      }