Java Integer to IP Address intToIpString(int ip)

Here you can find the source of intToIpString(int ip)

Description

int To Ip String

License

Apache License

Declaration

public static String intToIpString(int ip) 

Method Source Code

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

public class Main {
    public static String intToIpString(int ip) {
        StringBuffer sb = new StringBuffer();
        sb.append((ip >> 24) & 0x0FF);
        sb.append(".");
        sb.append((ip >> 16) & 0x0FF);
        sb.append(".");
        sb.append((ip >> 8) & 0x0FF);
        sb.append(".");
        sb.append((ip >> 0) & 0x0FF);
        return sb.toString();
    }/*from ww  w  . ja v a 2s. c  o  m*/
}

Related

  1. intToIp(int ip)
  2. intToIP(int ipAddr)
  3. intToIp(int ipInt)
  4. intToIpAddr(int ip)
  5. intToIpAddress(int i)
  6. intToIpV4(int i)
  7. intToIpV4String(int intIp)