code: private JSONObject tableRecSyncHelper(byte[] imgData, long timeout, String resultType) {
          JSONObject res = tableRecognitionAsync(imgData, null);
          if (res.has("error_code")) {
              return res;
          }
          String reqId = res.getJSONArray("result").getJSONObject(0).getString("request_id");
          long start = Calendar.getInstance().getTimeInMillis();
          long sleepInterval = 2000;
          JSONObject result;
          while (true) {
              long now = Calendar.getInstance().getTimeInMillis();
              if (now - start > timeout) {
                  // 超时
                  return AipError.ASYNC_TIMEOUT_ERROR.toJsonResult();
              }
              result = getTableResultHelper(reqId, resultType);
              if (result.has("error_code")) {
                  // 返回错误
                  return result;
              }
              int retCode = result.getJSONObject("result").getInt("ret_code");
              if (retCode == OcrConsts.ASYNC_TASK_STATUS_FINISHED) {
                  return result;
              }
              else {
                  try {
                      Thread.sleep(sleepInterval);
                  } catch (InterruptedException e) {
                      e.printStackTrace();
                  }
              }
          }
      }
docs: 表格识别接口包装同步接口，负责发起识别请求并等待结果生成。