code: private static int consumeSeparator(final Buffer buffer, final byte b) throws IndexOutOfBoundsException,
              IOException {
          buffer.markReaderIndex();
          int consumed = consumeSWS(buffer);
          if (isNext(buffer, b)) {
              buffer.readByte();
              ++consumed;
          } else {
              buffer.resetReaderIndex();
              return 0;
          }
          consumed += consumeSWS(buffer);
          return consumed;
      }
docs: Helper function for checking stuff as described below. It is all the same pattern so...
  (from rfc 3261 section 25.1)
  
  When tokens are used or separators are used between elements,
  whitespace is often allowed before or after these characters:
  
  STAR    =  SWS "*" SWS ; asterisk
  SLASH   =  SWS "/" SWS ; slash
  EQUAL   =  SWS "=" SWS ; equal
  LPAREN  =  SWS "(" SWS ; left parenthesis
  RPAREN  =  SWS ")" SWS ; right parenthesis
  RAQUOT  =  ">" SWS ; right angle quote
  LAQUOT  =  SWS "<"; left angle quote
  COMMA   =  SWS "," SWS ; comma
  SEMI    =  SWS ";" SWS ; semicolon
  COLON   =  SWS ":" SWS ; colon
  LDQUOT  =  SWS DQUOTE; open double quotation mark
  RDQUOT  =  DQUOTE SWS ; close double quotation mark
  
  @param buffer
  @param b
  @return the number of bytes that was consumed.
  @throws IOException
  @throws IndexOutOfBoundsException