code: public int length() {
          int length;
          if (head < tail) {
              length = hpackHeaderFields.length - tail + head;
          } else {
              length = head - tail;
          }
          return length;
      }
docs: Return the number of header fields in the dynamic table.