Java Long to IP Address long2ip(long address)

Here you can find the source of long2ip(long address)

Description

longip

License

Open Source License

Declaration

public static String long2ip(long address) 

Method Source Code

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

public class Main {
    public static String long2ip(long address) {
        long d = address & 0xFF;
        long c = (address >> 8) & 0xFF;
        long b = (address >> 16) & 0xFF;
        long a = (address >> 24) & 0xFF;

        return String.format("%d.%d.%d.%d", a, b, c, d);
    }/*from  w w w.  j  a  va  2s.c om*/
}

Related

  1. long2Ip(final long ip)
  2. long2ip(long ip)
  3. long2ip(long ip)
  4. long2ip(long ip)
  5. long2ip(long ip)