code: public Map<String,String> parse(final char[] chars, int offset, int length, char separator) {
  
  		if (chars == null) {
  			return new HashMap<String,String>();
  		}
  		HashMap<String,String> params = new HashMap<String,String>();
  		this.chars = chars;
  		this.pos = offset;
  		this.len = length;
  
  		String paramName = null;
  		String paramValue = null;
  		while (hasChar()) {
  			paramName = parseToken(new char[] { '=', separator });
  			paramValue = null;
  			if (hasChar() && (chars[pos] == '=')) {
  				pos++; // skip '='
  				paramValue = parseQuotedToken(new char[] { separator });
  			}
  			if (hasChar() && (chars[pos] == separator)) {
  				pos++; // skip separator
  			}
  			if ((paramName != null) && (paramName.length() > 0)) {
  				if (this.lowerCaseNames) {
  					paramName = paramName.toLowerCase();
  				}
  				params.put(paramName, paramValue);
  			}
  		}
  		return params;
  	}
docs: Extracts a map of name/value pairs from the given array of characters. Names are expected to be unique.
  
  @param chars the array of characters that contains a sequence of name/value pairs
  @param offset - the initial offset.
  @param length - the length.
  @param separator the name/value pairs separator
  
  @return a map of name/value pairs