Flex 数值转IP

package common
{
	public class IpUtil
	{
		public function IpUtil()
		{
		}
		public static function utoip(uIp:uint):String
		{
			var date1:uint = (uIp & 0xff000000) >> 24 & 0x000000ff;
			var date2:uint = (uIp & 0x00ff0000) >> 16;
			var date3:uint = (uIp & 0x0000ff00) >> 8;
			var date4:uint = uIp & 0x000000ff;
			return date1.toString() + "." + date2.toString() + "." + date3.toString() + "." + date4.toString();
		}
	}
}

你可能感兴趣的:(Flex)