public static String paramMapToString ( final Map < String , String [ ] > parameters ) { final StringBuffer result = new StringBuffer ( ) ; for ( final String key : parameters . keySet ( ) ) { String [ ] values = parameters . get ( key ) ; if ( null == values ) { result . append ( key ) . append ( ' ' ) ; } else { for ( final String value : parameters . get ( key ) ) { result . append ( key ) . append ( ' ' ) . append ( CmsEncoder . encode ( value ) ) . append ( ' ' ) ; } } } // remove last '&' if ( result . length ( ) > 0 ) { result . setLength ( result . length ( ) - 1 ) ; } return result . toString ( ) ; }
Converts a parameter map to the parameter string .