Here you can find the source of intToIpString(int ip)
public static String intToIpString(int ip)
//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*/ }