question: protected String decodeVal ( String v ) { char [ ] chars = v . toCharArray ( ) ; StringBuffer sb = new StringBuffer ( chars . length ) ; int i = 0 , lastIdx = 0 ; for ( i = 0 ; i < chars . length ; i ++ ) { if ( chars [ i ] == '%' && i + 2 < chars . length && chars [ i + 1 ] == '2' ) { if ( lastIdx != i ) { sb . append ( chars , lastIdx , i - lastIdx ) ; } if ( chars [ i + 2 ] == 'C' ) { sb . append ( ',' ) ; } else if ( chars [ i + 2 ] == '5' ) { sb . append ( '%' ) ; } else { sb . append ( chars , i , 3 ) ; } i += 2 ; lastIdx = i + 1 ; } } if ( lastIdx != i ) { sb . append ( chars , lastIdx , i - lastIdx ) ; } return sb . toString ( ) ; }
target:  Decodes a value, %2C to comma and %25 to percent. 