Java Integer to IP Address intToIpAddress(int i)

Here you can find the source of intToIpAddress(int i)

Description

int To Ip Address

License

Open Source License

Declaration

public static String intToIpAddress(int i) 

Method Source Code

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

public class Main {
    public static String intToIpAddress(int i) {
        StringBuilder buf = new StringBuilder(15);
        buf.append(i >> 24 & 0xff);
        buf.append('.');
        buf.append(i >> 16 & 0xff);
        buf.append('.');
        buf.append(i >> 8 & 0xff);
        buf.append('.');
        buf.append(i & 0xff);/*from w  ww.  ja v a  2 s  .  c  om*/
        return buf.toString();
    }
}

Related

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