docs: @Override
      public boolean parseBinaryFirstLine(WsByteBuffer buff) throws MalformedMessageException {
          if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
              Tr.debug(tc, "parseBinaryFirstLine for " + this);
              Tr.debug(tc, "Buffer: " + buff);
          }
          if (getBinaryParseState() == HttpInternalConstants.PARSING_BINARY_VERSION) {
              if (!buff.hasRemaining()) {
                  return false;
              }
              byte version = buff.get();
              if (version != HttpInternalConstants.BINARY_TRANSPORT_V1) {
                  if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                      Tr.debug(tc, "Unsupported binary version in message: " + version);
                  }
                  throw new MalformedMessageException("Invalid binary message");
              }
              setBinaryParseState(HttpInternalConstants.PARSING_METHOD_ID_OR_LEN);
              resetCacheToken(4);
          }
  
          boolean complete = false;
          int value;
          while (!complete) {
              // at this point, the parsed token array is always set up, so we
              // can try to fill it now
              if (!fillCacheToken(buff)) {
                  return false;
              }
              switch (getBinaryParseState()) {
                  case HttpInternalConstants.PARSING_METHOD_ID_OR_LEN:
                      value = GenericUtils.asInt(getParsedToken());
                      if (0 == (value & GenericConstants.KNOWN_MASK)) {
                          setMethod(MethodValues.getByOrdinal(value));
                          setBinaryParseState(HttpInternalConstants.PARSING_URI_LEN);
                          resetCacheToken(4);
                      } else {
                          setBinaryParseState(HttpInternalConstants.PARSING_UNKNOWN_METHOD);
                          resetCacheToken(value & GenericConstants.UNKNOWN_MASK);
                      }
                      break;
                  case HttpInternalConstants.PARSING_UNKNOWN_METHOD:
                      setMethod(MethodValues.find(getParsedToken()));
                      setBinaryParseState(HttpInternalConstants.PARSING_URI_LEN);
                      createCacheToken(4);
                      break;
  
                  case HttpInternalConstants.PARSING_URI_LEN:
                      setBinaryParseState(HttpInternalConstants.PARSING_URI);
                      resetCacheToken(GenericUtils.asInt(getParsedToken()));
                      break;
  
                  case HttpInternalConstants.PARSING_URI:
                      setRequestURL(getParsedToken());
                      setBinaryParseState(HttpInternalConstants.PARSING_VERSION_ID_OR_LEN);
                      createCacheToken(4);
                      break;
  
                  case HttpInternalConstants.PARSING_VERSION_ID_OR_LEN:
                      value = GenericUtils.asInt(getParsedToken());
                      if (0 == (value & GenericConstants.KNOWN_MASK)) {
                          setVersion(VersionValues.getByOrdinal(value));
                          setBinaryParseState(GenericConstants.PARSING_HDR_FLAG);
                          resetCacheToken(4);
                          complete = true;
                      } else {
                          setBinaryParseState(HttpInternalConstants.PARSING_UNKNOWN_VERSION);
                          resetCacheToken(value & GenericConstants.UNKNOWN_MASK);
                      }
                      break;
  
                  case HttpInternalConstants.PARSING_UNKNOWN_VERSION:
                      setVersion(VersionValues.find(getParsedToken()));
                      setBinaryParseState(GenericConstants.PARSING_HDR_FLAG);
                      createCacheToken(4);
                      complete = true;
                      break;
  
                  default:
                      throw new MalformedMessageException("Invalid state in first line: " + getBinaryParseState());
              } // end of switch block
  
          } // end of while loop
  
          setFirstLineComplete(true);
          return true;
      }