Java Long to IP Address long2IpAdress(long src)

Here you can find the source of long2IpAdress(long src)

Description

long Ip Adress

License

Open Source License

Declaration

public static String long2IpAdress(long src) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static String long2IpAdress(long src) {
        long l = 256 * 256 * 256;
        StringBuffer stringBuffer = new StringBuffer();
        while (l > 0) {
            stringBuffer.append(src / l).append(".");
            src = src % l;// w ww. j  av a 2  s .c  om
            l /= 256;
        }
        stringBuffer.deleteCharAt(stringBuffer.length() - 1);
        return stringBuffer.toString();
    }
}

Related

  1. long2ip(long ip)
  2. long2ip(long ip)
  3. long2ip(long ipLong)
  4. long2IP(long ipLong)
  5. long2IP(long proper_address)
  6. longToIp(long address)
  7. longToIp(long i)
  8. longToIp(long i)
  9. longToIp(long ip)