Here you can find the source of IPToString(int intIP)
public static String IPToString(int intIP)
//package com.java2s; //License from project: BSD License public class Main { public static String IPToString(int intIP) { StringBuilder sb = new StringBuilder(15); try {//from ww w . ja v a 2 s . com for (int i = 3; i >= 0; i--) { if (i != 3) sb.append('.'); sb.append((int) (intIP & 0xFF)); intIP = intIP >>> 8; } } catch (Exception e) { e.printStackTrace(); } return (sb.toString()); } }