question: private static void encodePatterns ( IPath [ ] patterns , String tag , Map parameters ) { if ( patterns != null && patterns . length > 0 ) { StringBuffer rule = new StringBuffer ( 10 ) ; for ( int i = 0 , max = patterns . length ; i < max ; i ++ ) { if ( i > 0 ) rule . append ( '|' ) ; rule . append ( patterns [ i ] ) ; } parameters . put ( tag , String . valueOf ( rule ) ) ; } }
target:  Encode some patterns into XML parameter tag