question: public static String escapeColonInString ( String str ) { if ( str != null ) { if ( str . indexOf ( ":" ) >= 0 ) { str = str . replaceAll ( ":" , "&#58;" ) ; } } return str ; }
target:  Escapes colons (":") in the supplied String to "&#58;". Useful mostly for the MBean names, as jdmk really doesn't like them.