protected String rebuildQueryStringWithoutParameter ( String source , String ... params ) { if ( source == null || source . length ( ) == 0 ) return "" ; if ( params == null || params . length == 0 ) return source ; HashSet < String > paramsSet = new HashSet < String > ( params . length ) ; paramsSet . addAll ( Arrays . asList ( params ) ) ; String [ ] tokens = StringUtils . tokenize ( source , ' ' ) ; StringBuilder ret = new StringBuilder ( ) ; for ( String t : tokens ) { String [ ] values = StringUtils . tokenize ( t , ' ' ) ; if ( paramsSet . contains ( values [ 0 ] ) ) continue ; if ( ret . length ( ) > 0 ) ret . append ( ' ' ) ; ret . append ( values [ 0 ] ) . append ( ' ' ) . append ( values . length >= 2 ? values [ 1 ] : "" ) ; } return ret . toString ( ) ; }
Rebuilds query string from source .