public static List < HttpParameter > decodeParameters ( String queryParameters ) { List < HttpParameter > result = new ArrayList < HttpParameter > ( ) ; for ( String pair : queryParameters . split ( "&" ) ) { String [ ] parts = pair . split ( "=" , 2 ) ; if ( parts . length == 2 ) { String name = decode ( parts [ 0 ] ) ; String value = decode ( parts [ 1 ] ) ; if ( ! name . equals ( "" ) && ! value . equals ( "" ) ) result . add ( new HttpParameter ( name , value ) ) ; } } return result ; }
Parses a query string without the leading ?