code: public static void append(ByteBuffer to, byte[] b, int off, int len) throws BufferOverflowException {
          int pos = flipToFill(to);
          try {
              to.put(b, off, len);
          } finally {
              flipToFlush(to, pos);
          }
      }
docs: Append bytes to a buffer.
  
  @param to  Buffer is flush mode
  @param b   bytes to append
  @param off offset into byte
  @param len length to append
  @throws BufferOverflowException if unable to append buffer due to space limits