code: private boolean quickStart(ByteBuffer buffer) {
          if (_requestHandler != null) {
              _method = HttpMethod.lookAheadGet(buffer);
              if (_method != null) {
                  _methodString = _method.asString();
                  buffer.position(buffer.position() + _methodString.length() + 1);
  
                  setState(State.SPACE1);
                  return false;
              }
          } else if (_responseHandler != null) {
              _version = HttpVersion.lookAheadGet(buffer);
              if (_version != null) {
                  buffer.position(buffer.position() + _version.asString().length() + 1);
                  setState(State.SPACE1);
                  return false;
              }
          }
  
          // Quick start look
          while (_state == State.START && buffer.hasRemaining()) {
              HttpTokens.Token t = next(buffer);
              if (t == null)
                  break;
  
              switch (t.getType()) {
                  case ALPHA:
                  case DIGIT:
                  case TCHAR:
                  case VCHAR: {
                      _string.setLength(0);
                      _string.append(t.getChar());
                      setState(_requestHandler != null ? State.METHOD : State.RESPONSE_VERSION);
                      return false;
                  }
                  case OTEXT:
                  case SPACE:
                  case HTAB:
                      throw new IllegalCharacterException(_state, t, buffer);
  
                  default:
                      break;
              }
  
              // count this white space as a header byte to avoid DOS
              if (_maxHeaderBytes > 0 && ++_headerBytes > _maxHeaderBytes) {
                  LOG.warn("padding is too large >" + _maxHeaderBytes);
                  throw new BadMessageException(HttpStatus.BAD_REQUEST_400);
              }
          }
          return false;
      }
docs: /* Quick lookahead for the start state looking for a request method or a HTTP version,
  otherwise skip white space until something else to parse.