public static String convertLongToIp(long num) {
	return ((num >> 24) & 0xFF) + "."
			+ ((num >> 16) & 0xFF) + "."
			+ ((num >> 8) & 0xFF) + "."
			+ (num & 0xFF);
}


Back to JavaHowTo

Alumni Liaison

Prof. Math. Ohio State and Associate Dean
Outstanding Alumnus Purdue Math 2008

Jeff McNeal