public static String[] decodeArray(String encodedArray){
  String[] items=encodedArray.split("_\\.");
  ArrayList<String> list=new ArrayList<String>();
  for (int i=0; i < items.length; i++) {
    String item=items[i];
    item=gsub("__","_",item);
    if (!item.equals("")) {
      list.add(item);
    }
  }
  return list.toArray(new String[list.size()]);
}

public static String [ ] decodeArray ( String encodedArray ) { String [ ] items = encodedArray . split ( "_\\." ) ; ArrayList < String > list = new ArrayList < String > ( ) ; for ( int i = 0 ; i < items . length ; i ++ ) { String item = items [ i ] ; item = gsub ( "__" , "_" , item ) ; if ( ! item . equals ( "" ) ) { list . add ( item ) ; } } return list . toArray ( new String [ list . size ( ) ] ) ; }
decodes a string generated by encodearray .
