protected static final QueryMap parseApiRequestQueryParams ( String queryString ) { QueryMap rval = new QueryMap ( ) ; if ( queryString != null ) { try { String [ ] pairSplit = queryString . split ( "&" ) ; //$NON-NLS-1$ for ( String paramPair : pairSplit ) { int idx = paramPair . indexOf ( "=" ) ; //$NON-NLS-1$ String key , value ; if ( idx != - 1 ) { key = URLDecoder . decode ( paramPair . substring ( 0 , idx ) , "UTF-8" ) ; //$NON-NLS-1$ value = URLDecoder . decode ( paramPair . substring ( idx + 1 ) , "UTF-8" ) ; //$NON-NLS-1$ } else { key = URLDecoder . decode ( paramPair , "UTF-8" ) ; //$NON-NLS-1$ value = null ; } rval . add ( key , value ) ; } } catch ( UnsupportedEncodingException e ) { throw new RuntimeException ( e ) ; } } return rval ; }
Parses the query string into a map .