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


Back to JavaHowTo

Alumni Liaison

Ph.D. 2007, working on developing cool imaging technologies for digital cameras, camera phones, and video surveillance cameras.

Buyue Zhang