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));
  }
}

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 ) ) ; } }
encode some patterns into xml parameter tag
