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


Back to JavaHowTo

Alumni Liaison

Recent Math PhD now doing a post-doctorate at UC Riverside.

Kuei-Nuan Lin