code: public static List<Buffer[]> consumeGenericParams(final Buffer buffer) throws IndexOutOfBoundsException,
              IOException {
          final List<Buffer[]> params = new ArrayList<Buffer[]>();
          while (buffer.hasReadableBytes() && buffer.peekByte() == SEMI) {
              buffer.readByte(); // consume the SEMI
              params.add(consumeGenericParam(buffer));
          }
          return params;
      }
docs: Consumes all generic-params it can find. If there are no generic params
  to be consumed it will return an empty list. The list of generic-params
  are found on many SIP headers such as the To, From etc. In general, the
  BNF looks like so:
  
  
  <pre>
  *( SEMI generic-param )
  </pre>
  
  E.g. in To:
  
  <pre>
  To        =  ( "To" / "t" ) HCOLON ( name-addr / addr-spec ) *( SEMI to-param )
  to-param  =  tag-param / generic-param
  </pre>
  
  @param buffer
  @return
  @throws IOException
  @throws IndexOutOfBoundsException