code: public void readPayload(byte[] dst, int off, int len)
              throws IOException
      {
          while (true) {
              int bufferRemaining = buffer.size() - position;
              if (bufferRemaining >= len) {
                  buffer.getBytes(position, dst, off, len);
                  position += len;
                  return;
              }
              buffer.getBytes(position, dst, off, bufferRemaining);
              off += bufferRemaining;
              len -= bufferRemaining;
              position += bufferRemaining;
  
              nextBuffer();
          }
      }
docs: Reads payload bytes of binary, extension, or raw string types.
  
  This consumes specified amount of bytes into the specified byte array.
  
  @param dst the byte array into which the data is read
  @param off the offset in the dst array
  @param len the number of bytes to read
  @throws IOException when underlying input throws IOException