public static InetSocketAddress parseSocketAddress(String addr){
  String[] parts=addr.split(COLON);
  Preconditions.checkArgument(parts.length == 2);
  String hostname=parts[0];
  int port=Integer.parseInt(parts[1]);
  return new InetSocketAddress(hostname,port);
}

public static InetSocketAddress parseSocketAddress ( String addr ) { String [ ] parts = addr . split ( COLON ) ; Preconditions . checkArgument ( parts . length == 2 ) ; String hostname = parts [ 0 ] ; int port = Integer . parseInt ( parts [ 1 ] ) ; return new InetSocketAddress ( hostname , port ) ; }
parse the inet socket address from the string representation .
