Here you can find the source of long2IpAdress(long src)
public static String long2IpAdress(long src)
//package com.java2s; //License from project: Open Source License public class Main { public static String long2IpAdress(long src) { long l = 256 * 256 * 256; StringBuffer stringBuffer = new StringBuffer(); while (l > 0) { stringBuffer.append(src / l).append("."); src = src % l;// w ww. j av a 2 s .c om l /= 256; } stringBuffer.deleteCharAt(stringBuffer.length() - 1); return stringBuffer.toString(); } }