public static String serializeAddressList(List<String> addressList){
  StringBuilder sb=new StringBuilder();
  for (  String s : addressList) {
    if (sb.length() != 0) {
      sb.append(",");
    }
    sb.append(s);
  }
  return sb.toString();
}

public static String serializeAddressList ( List < String > addressList ) { StringBuilder sb = new StringBuilder ( ) ; for ( String s : addressList ) { if ( sb . length ( ) != 0 ) { sb . append ( "," ) ; } sb . append ( s ) ; } return sb . toString ( ) ; }
serialize a list of ip addresses to a string .
