protected void readFrame() throws TTransportException {
    underlying.readAll(i32buf, 0, 4);
    int size = TFramedTransport.decodeFrameSize(i32buf);

    if (size < 0) {
      close();
      throw new TTransportException(
          TTransportException.CORRUPTED_DATA, "Read a negative frame size (" + size + ")!");
    }

    if (size > thriftMaxFrameSize) {
      close();
      if (size == 1195725856L || size == 1347375956L) {
        // if someone sends HTTP GET/POST to this port, the size will be read as the following
        throw new TTransportException(
            TTransportException.CORRUPTED_DATA,
            "Singular frame size ("
                + size
                + ") detected, you may be sending HTTP GET/POST requests to the Thrift-RPC port, please confirm that you are using the right port");
      } else {
        throw new TTransportException(
            TTransportException.CORRUPTED_DATA,
            "Frame size (" + size + ") larger than protect max size (" + thriftMaxFrameSize + ")!");
      }
    }
    readBuffer.fill(underlying, size);
  }
When copyBinary flag is true, the transport will copy the binary data from the underlying.
This is a protection for the underlying buffer to be reused by the caller protocol.
iotdb-client/service-rpc/src/main/java/org/apache/iotdb/rpc/TElasticFramedTransport.java