Here you can find the source of LongToIp(long longIp)
public static String LongToIp(long longIp)
//package com.java2s; //License from project: Apache License public class Main { public static String LongToIp(long longIp) { StringBuffer sb = new StringBuffer(""); sb.append(String.valueOf((longIp >>> 24))); sb.append("."); sb.append(String.valueOf((longIp & 0x00FFFFFF) >>> 16)); sb.append("."); sb.append(String.valueOf((longIp & 0x0000FFFF) >>> 8)); sb.append("."); sb.append(String.valueOf((longIp & 0x000000FF))); return sb.toString(); }/*ww w . ja v a 2 s . c om*/ }