Here you can find the source of intToIP(int ipAddr)
public static final String intToIP(int ipAddr)
//package com.java2s; //License from project: Open Source License public class Main { public static final String intToIP(int ipAddr) { long ip = 0xFFFFFFFFL & ipAddr; String str = new Long(ip % 256).toString(); str = "." + str; ip >>>= 8;/*from ww w . ja va 2 s. co m*/ str = new Long(ip % 256).toString() + str; str = "." + str; ip >>>= 8; str = new Long(ip % 256).toString() + str; str = "." + str; ip >>>= 8; str = new Long(ip % 256).toString() + str; return str; } }