public Map < String , String > getParamMap ( String params ) { Map < String , String > result = new HashMap < String , String > ( ) ; String [ ] paramlist = params . split ( "&" ) ; for ( int i = 0 ; i < paramlist . length ; i ++ ) { String [ ] parts = paramlist [ i ] . split ( "=" ) ; if ( parts . length == 2 ) result . put ( parts [ 0 ] , parts [ 1 ] ) ; } return result ; }
get a Map of parameter from a & delimited parameter list