Java InetAddress Create getIP(InetAddress ip)

Here you can find the source of getIP(InetAddress ip)

Description

get IP

License

Creative Commons License

Declaration

public static String getIP(InetAddress ip) 

Method Source Code


//package com.java2s;
//License from project: Creative Commons License 

import java.net.InetAddress;

public class Main {
    public static String getIP(InetAddress ip) {
        return ip.getHostAddress().replace("/", "");
    }/*w  w  w.  j  a  va 2 s .c om*/
}

Related

  1. getInetAddressMap()
  2. getInetAddressMap()
  3. getInt32FromAddress(Inet4Address inetAddress)
  4. getInterface(InetAddress addr)
  5. getIP(InetAddress ip)
  6. getIP(InetAddress ip)
  7. getIPAsLong(InetAddress address)
  8. getIPAsString(InetAddress addr)
  9. getIPv4LocalNetMask(InetAddress ip, int netPrefix)