public final static HeaderElement[] parseElements(final String value,HeaderValueParser parser) throws ParseException {
  if (value == null) {
    throw new IllegalArgumentException("Value to parse may not be null");
  }
  if (parser == null)   parser=SaveHeaderValueParser.DEFAULT;
  CharArrayBuffer buffer=new CharArrayBuffer(value.length());
  buffer.append(value);
  SaveParserCursor cursor=new SaveParserCursor(0,value.length());
  return parser.parseElements(buffer,cursor);
}

public final static HeaderElement [ ] parseElements ( final String value , HeaderValueParser parser ) throws ParseException { if ( value == null ) { throw new IllegalArgumentException ( "Value to parse may not be null" ) ; } if ( parser == null ) parser = SaveHeaderValueParser . DEFAULT ; CharArrayBuffer buffer = new CharArrayBuffer ( value . length ( ) ) ; buffer . append ( value ) ; SaveParserCursor cursor = new SaveParserCursor ( 0 , value . length ( ) ) ; return parser . parseElements ( buffer , cursor ) ; }
parses elements with the given parser .
