public static Multimap<String, String> getParametersFromRawQuery(String rawQuery) {

        Multimap<String, String> result = ArrayListMultimap.create();
        if (rawQuery != null) {
            for (String keyValuePair : CmsStringUtil.splitAsList(rawQuery, "&")) {
                try {
                    String decodedKeyValue = URLDecoder.decode(keyValuePair, "UTF-8");
                    int eqPos = decodedKeyValue.indexOf("=");
                    if (eqPos < 0) {
                        decodedKeyValue = decodedKeyValue + "=";
                        eqPos = decodedKeyValue.indexOf("=");
                    }
                    String key = decodedKeyValue.substring(0, eqPos);
                    String value = decodedKeyValue.substring(eqPos + 1);
                    result.put(key, value);
                } catch (UnsupportedEncodingException e) {
                    // UTF8 should be present
                }
            }
        }
        return result;
    }
public static Multimap < String , String > getParametersFromRawQuery ( String rawQuery ) { Multimap < String , String > result = ArrayListMultimap . create ( ) ; if ( rawQuery != null ) { for ( String keyValuePair : CmsStringUtil . splitAsList ( rawQuery , "&" ) ) { try { String decodedKeyValue = URLDecoder . decode ( keyValuePair , "UTF-8" ) ; int eqPos = decodedKeyValue . indexOf ( "=" ) ; if ( eqPos < 0 ) { decodedKeyValue = decodedKeyValue + "=" ; eqPos = decodedKeyValue . indexOf ( "=" ) ; } String key = decodedKeyValue . substring ( 0 , eqPos ) ; String value = decodedKeyValue . substring ( eqPos + 1 ) ; result . put ( key , value ) ; } catch ( UnsupportedEncodingException e ) { } } } return result ; }
Parses the parameter map from a raw query string.<p>

@param rawQuery the raw query string

@return the parameter map