Java InetAddress Create getConnectionAddress(InetAddress addr)

Here you can find the source of getConnectionAddress(InetAddress addr)

Description

get Connection Address

License

Apache License

Declaration

public static InetAddress getConnectionAddress(InetAddress addr) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.net.InetAddress;

public class Main {
    public static InetAddress getConnectionAddress(InetAddress addr) {
        return addr.isAnyLocalAddress() ? InetAddress.getLoopbackAddress() : addr;
    }//from   w ww  .  j  ava  2s .c o  m
}

Related

  1. getAllIPv4InetAddresses()
  2. getAllLocalIPv4InetAddresses()
  3. getBroadcast(InetAddress address)
  4. getBytes(InetAddress addr, int port)
  5. getClassPart(InetAddress ip, int partNumber)
  6. getDestinationInetAddress(URI uri)
  7. getExternalAddresses(InetAddress[] addresses)
  8. getFQDN(final InetAddress addr)
  9. getFreePort(InetAddress ipAddress)