public static InetSocketAddress createMapAddress(Map map) throws MessageException {
  if (!map.containsKey(PORT) || !map.containsKey(ADDRESS))   throw new MessageException("Invalid address map");
  int port=(int)(long)map.get(PORT);
  String address=(String)map.get(ADDRESS);
  return new InetSocketAddress(address,port);
}

public static InetSocketAddress createMapAddress ( Map map ) throws MessageException { if ( ! map . containsKey ( PORT ) || ! map . containsKey ( ADDRESS ) ) throw new MessageException ( "Invalid address map" ) ; int port = ( int ) ( long ) map . get ( PORT ) ; String address = ( String ) map . get ( ADDRESS ) ; return new InetSocketAddress ( address , port ) ; }
create an address from a map .
