code: public void parse() throws AuthHeaderParsingException {
  
  		String[] parts = headerValue.trim().split("\\s+", 2);
  		if (parts.length < 1) {
  			throw new AuthHeaderParsingException("Unable to split scheme and other part in " + headerValue);
  		}
  
  		builder.scheme(parts[0]);
  		
  		if(parts.length == 1) {
  			return;
  		}
  		
  		// FIXME: handle optional, one-time token
  
  		for (String kv : parts[1].split(",")) {
  			String[] kva = kv.trim().split("=", 2);
  			if (!(kva.length == 2)) {
  				throw new AuthHeaderParsingException("Unable to split " + kv + " into parameter key and value in " + headerValue);
  			}
  			if (kva[1].startsWith("\"")) {
  				kva[1] = kva[1].substring(1, kva[1].length() - 1);
  			}
  			builder.param(kva[0], kva[1]);
  		}
  	}
docs: http://javasourcecode.org/html/open-source/jdk/jdk-6u23/sun/net/www/HeaderParser.java.html