Revision as of 04:38, 23 November 2010 by Han84 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
public static String convertLongToIp(long num) {
	return ((num >> 24) & 0xFF) + "."
			+ ((num >> 16) & 0xFF) + "."
			+ ((num >> 8) & 0xFF) + "."
			+ (num & 0xFF);
}


Back to JavaHowTo

Alumni Liaison

To all math majors: "Mathematics is a wonderfully rich subject."

Dr. Paul Garrett