code: public WsByteBuffer[] buildFrameArrayForWrite() {
          WsByteBuffer[] output;
  
          int headerSize = SIZE_FRAME_BEFORE_PAYLOAD;
          if (PADDED_FLAG) {
              headerSize = SIZE_FRAME_BEFORE_PAYLOAD + 1;
          }
          WsByteBuffer frameHeaders = getBuffer(headerSize);
          byte[] frame;
          if (frameHeaders.hasArray()) {
              frame = frameHeaders.array();
          } else {
              frame = super.createFrameArray();
          }
  
          // add the first 9 bytes of the array
          setFrameHeaders(frame, utils.FRAME_TYPE_DATA);
  
          // set up the frame payload
          int frameIndex = SIZE_FRAME_BEFORE_PAYLOAD;
  
          // add pad length field
          if (PADDED_FLAG) {
              utils.Move8BitstoByteArray(paddingLength, frame, frameIndex);
              frameIndex++;
          }
          frameHeaders.put(frame, 0, headerSize);
          frameHeaders.flip();
  
          // create padding and put in return buffer array
          if (PADDED_FLAG) {
              WsByteBuffer padding = getBuffer(paddingLength);
              for (int i = 0; i < paddingLength; i++) {
                  padding.put((byte) 0);
              }
              padding.flip();
              output = new WsByteBuffer[3];
              output[0] = frameHeaders;
              output[1] = dataBuffer;
              output[2] = padding;
          }
          // create the output buffer array
          else {
              output = new WsByteBuffer[2];
              output[0] = frameHeaders;
              output[1] = dataBuffer;
          }
          return output;
      }
docs: Builds an array of buffers representing this http2 data frame
  output[0] = http2 frame header data
  output[1] = payload data
  output[2] ?= padding
  
  @return WsByteBuffer[]