java ipµØַת»»Îª³¤ÕûÐÍ
java ipµØַת»»Îª³¤ÕûÐÍ£»
public class Util {
/**
* ×Ö·û´®ipת»»Îªlong
* @param ×Ö·û´®ip
* @return
*/
public static long getStringIpToLong(String ip) {
String[] ips = ip.split("[.]");
long num = 16777216L*Long.parseLong(ips[0]) +
65536L*Long.parseLong(ips[1]) + 256*Long.parseLong(ips[2]) +
Long.parseLong(ips[3]);
return num;
}
/**
* ³¤ÕûÐÍipת»»Îªstring
* @param longÐÍip
* @return
*/
public static String getLongIpToString(long ipLong) {
long mask[] = {0x000000FF,0x0000FF00,0x00FF0000,0xFF000000};
long num = 0;
StringBuffer ipInfo = new StringBuffer();
for(int i=0;i<4;i++){
num = (ipLong & mask[i])>>(i*8);
if(i>0) ipInfo.insert(0,".");
ipInfo.insert(0,Long.toString(num,10));
}
return ipInfo.toString();
}
}
Ïà¹ØÎĵµ£º
package com.word.tools.pool;
import java.util.Vector;
import com.word.po.ObjectPool_Param;
import com.word.po.TyjkXmlPO;
public class TyjkXmlPool
{
/**¶ÔÏó³Ø²ÎÊý*/
private ObjectPool_Param ob_param;
/**´æ·Å¶ÔÏóµÄVector*/
......
1. import java.text.DateFormat;
2. import java.text.ParseException;
3. import java.util.Date;
4.
5. /**
6. * @description 計ËãÁ½¸öÈÕÆÚÏà²îµÄÌìÊý
7. * @author ZhouJingxian
8. *
9. */
10. public class CountDate {
11.
12. ......
Java
ÐéÄâ»ú(JVM)ÊÇ¿ÉÔËÐÐJava
´úÂëµÄ¼ÙÏë¼ÆËã»ú¡£Ö»Òª¸ù¾ÝJVM¹æ¸ñÃèÊö½«½âÊÍÆ÷ÒÆÖ²µ½Ìض¨µÄ¼ÆËã»úÉÏ£¬¾ÍÄܱ£Ö¤¾¹ý±àÒëµÄÈκÎJava´úÂëÄܹ»ÔÚ¸ÃϵͳÉÏÔËÐС£±¾ÎÄÊ×ÏȼòÒª½éÉÜ´ÓJavaÎļþµÄ±àÒëµ½×îÖÕÖ´ÐеĹý³Ì£¬Ëæºó¶ÔJVM¹æ¸ñÃèÊö×÷һ˵Ã÷¡£
¡¡¡¡
¡¡¡¡Ò».JavaÔ´ÎļþµÄ±àÒë¡¢ÏÂÔØ
¡¢½âÊͺÍÖ´ÐÐ
¡¡¡¡JavaÓ¦ÓóÌÐòµÄ¿ª·¢ ......
ÏÂÃæÕâƪÎÄÕÂÊÇ̨ÍåÖøÃûJavaÂÛ̳“Javaworld”µÄÒ»¸ö×ÊÉî°æÖ÷дµÄÒ»·â¶ÔJavaÐÂÊÖµÄÐÅ£¬Ï£ÍûС×é³ÉÔ±×Ðϸ¿´Ï Äã»áѧµ½ºÜ¶àµÄ¡¢¡¢¡¢¡¢
親愛µÄ java ÐÂÊÖ們 :
ºÜ¸ß興Äã們願Òâ來這裡¹²Í¬學習,
Java 這個語ÑÔ, Ò ......