Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

JPCAP java²Ù×÷ÍøÂç²ã

ÎÄÕÂÀïÓÐһЩ±í¸ñ£¬javaeyeµÄÌûºÃÏñ²»Ö§³Ö±í¸ñÐÎʽ£¬ÓÐÐËȤ¿ÉÒÔµ½ÎÒµÄblog¿´¿´¡£
http://hzxdark.javaeye.com
Ò»£®JPCAP¼ò½é
ÖÚËùÖÜÖª£¬JAVAÓïÑÔËäÈ»ÔÚTCP/UDP´«Êä·½Ãæ¸øÓèÁËÁ¼ºÃµÄ¶¨Ò壬µ«¶ÔÓÚÍøÂç²ãÒÔϵĿØÖÆ£¬È´ÊÇÎÞÄÜΪÁ¦µÄ¡£JPCAPÀ©Õ¹°üÃÖ²¹ÁËÕâÒ»µã¡£
JPCAPʵ¼ÊÉϲ¢·ÇÒ»¸öÕæÕýȥʵÏÖ¶ÔÊý¾ÝÁ´Â·²ãµÄ¿ØÖÆ£¬¶øÊÇÒ»¸öÖмä¼þ£¬JPCAPµ÷ÓÃwincap/libpcap£¬¶ø¸øJAVAÓïÑÔÌṩһ¸ö¹«¹²µÄ½Ó¿Ú£¬´Ó¶øʵÏÖÁËƽ̨ÎÞ¹ØÐÔ¡£ÔÚ¹Ù·½ÍøÕ¾ÉÏÉùÃ÷£¬JPCAPÖ§³ÖFreeBSD 3.x, Linux RedHat 6.1, Fedora Core 4, Solaris, and Microsoft Windows 2000/XPµÈϵͳ¡£
¶þ£®JPCAP»úÖÆ
JPCAPµÄÕû¸ö½á¹¹´óÌåÉϸúwincap/libpcapÊǺÜÏàÏñµÄ£¬ÀýÈçNetworkInterfaceÀà¶ÔÓ¦wincap µÄtypedef struct _ADAPTER  ADAPTER£¬getDeviceList()¶ÔÓ¦pcap_findalldevs()µÈµÈ¡£ JPCAPÓÐ16¸öÀ࣬ÏÂÃæ¾ÍÆäÖÐ×îÖØÒªµÄ4¸öÀà×ö˵Ã÷¡£
1£® NetworkInterface
¸ÃÀàµÄÿһ¸öʵÀý´ú±íÒ»¸öÍøÂçÉ豸£¬Ò»°ã¾ÍÊÇÍø¿¨¡£Õâ¸öÀàÖ»ÓÐһЩÊý¾Ý³ÉÔ±£¬³ýÁ˼̳Ð×Ôjava.lang.ObjectµÄ»ù±¾·½·¨ÒÔÍ⣬ûÓж¨ÒåÆäËü·½·¨¡£
Êý¾Ý³ÉÔ±
NetworkInterfaceAddress[] addresses
    Õâ¸ö½Ó¿ÚµÄÍøÂçµØÖ·¡£É趨ΪÊý×éÓ¦¸ÃÊÇ¿¼Âǵ½ÓÐЩÉ豸ͬʱÁ¬½Ó¶àÌõÏß·£¬ÀýÈç·ÓÉÆ÷¡£µ«ÎÒÃǵÄPC»úµÄÍø¿¨Ò»°ãÖ»ÓÐÒ»ÌõÏß·£¬ËùÒÔÎÒÃÇÒ»°ãÈ¡addresses[0]¾Í¹»ÁË¡£
java.lang.String datalink_description.
    Êý¾ÝÁ´Â·²ãµÄÃèÊö¡£ÃèÊöËùÔڵľÖÓòÍøÊÇʲôÍø¡£ÀýÈ磬ÒÔÌ«Íø£¨Ethernet£©¡¢ÎÞÏßLANÍø£¨wireless LAN£©¡¢ÁîÅÆ»·Íø(token ring)µÈµÈ¡£
java.lang.String datalink_name
   ¸ÃÍøÂçÉ豸Ëù¶ÔÓ¦Êý¾ÝÁ´Â·²ãµÄÃû³Æ¡£¾ßÌåÀ´Ëµ£¬ÀýÈçEthernet10M¡¢100M¡¢1000MµÈµÈ¡£
java.lang.String description
   Íø¿¨ÊÇXXXXÅÆ×ÓXXXXÐͺÅÖ®ÀàµÄÃèÊö¡£ÀýÈçÎÒµÄÍø¿¨ÃèÊö£ºRealtek RTL8169/8110 Family Gigabit Ethernet NIC
boolean Loopback
    ±êÖ¾Õâ¸öÉ豸ÊÇ·ñloopbackÉ豸¡£
byte[] mac_address
    Íø¿¨µÄMACµØÖ·£¬6¸ö×Ö½Ú¡£
java.lang.String Name
    Õâ¸öÉ豸µÄÃû³Æ¡£ÀýÈçÎÒµÄÍø¿¨Ãû³Æ£º\Device\NPF_{3CE5FDA5-E15D-4F87-B217-255BCB351CD5}
2£® JpcapCaptor
¸ÃÀàÌṩÁËһϵÁо²Ì¬·½·¨ÊµÏÖһЩ»ù±¾µÄ¹¦ÄÜ¡£¸ÃÀàÒ»¸öʵÀý´ú±í½¨Á¢ÁËÒ»¸öÓëÖ¸¶¨É豸µÄÁ´½Ó£¬¿ÉÒÔͨ¹ý¸ÃÀàµÄʵÀýÀ´¿ØÖÆÉ豸£¬ÀýÈçÉ趨Íø¿


Ïà¹ØÎĵµ£º

javaµ÷ÓÃhttpsµÄwebservice£¬httpsµÄwsdl

javaµ÷webServiceÌ«Õý³£ÁË¡£¡£¡£
ÔÚµ÷ÓÃhttpsµÄwebServiceµÄʱºò¼¸ÖÖ³£Óõķ½·¨»á³öÏÖ°²È«´íÎ󣬺ܶàÈË˵µÄÊÇÔÚjreÀïÃæ×°Ö¤Êé¡£¡£¡£ÄÇҲ̫ÓôÃÆÁË°É
ÕâÀïÌṩһÖÖ²»ÓÃÖ¤ÊéµÄ·½Ê½
¶Ô·½webServiceÌṩµÄ½Ó¿Ú£¬Õâ¸öÄãÓ¦¸ÃÒªÖªµÀµÄ°É£¬²»ÖªµÀµÄ»°¾Íwsdl×Ô¼º»¹Ô­
Java´úÂë
/**  
 * XXXµÄwebService½Ó¿ ......

java×Ö½ÚÂëѧϰ±Ê¼Ç

֮ǰÔÚ×öfindbugsµÄʱºò¾­³£»á²é¿´×Ö½ÚÂ룬¶¼ÊÇÒ»Öª°ë½âµÄ
ÄÇÌì¿´µ½Ò»¸öÎÊÌ⣬¸ÕºÃ¿ÉÒÔ´Ó×Ö½ÚÂëÀ´½âÊÍ
ÕâЩÌâÄ¿³£¼ûÓÚÃæÊÔÌ⣬ͨ³£ÒªÊÇË­¸ÒÕâôд´úÂ룬ÍêÈ«ÊÇÔÚÕÒËÀ¡£¡£
Java´úÂë
public class Test {   
    public static void main(String[]  ......

JavaÖеÄIOÁ÷֪ʶ×ܽᣨת£©

×ܽáÒ»£º
Java IOµÄÒ»°ãʹÓÃÔ­Ôò£º
Ò»¡¢°´Êý¾ÝÀ´Ô´£¨È¥Ïò£©·ÖÀࣺ
1¡¢ÊÇÎļþ£º FileInputStream, FileOutputStream, FileReader, FileWriter
2¡¢ÊÇbyte[]£ºByteArrayInputStream, ByteArrayOutputStream
3¡¢ÊÇChar[]: CharArrayReader, CharArrayWriter
4¡¢ÊÇString: StringBufferInputStream, StringReader, StringW ......

ΪʲôJAVAҪʹÓõ¥¼Ì³ÐÌåϵ

´ó¼Ò¶¼ÖªµÀJAVAÖÐʹÓÃOBJECT×÷ΪΨһµÄ»ùÀà¡£µ«ÊÇJAVAµÄÉè¼ÆÕßΪʲôҪÕâÑù×öÄØ£¿ÖضÁ¡¶TTHINKING IN JAVA¡·£¬µÃ³öÒÔÏÂÔ­Òò£º
1£¬JAVAÊÇ´¿ÃæÏò¶ÔÏóµÄÓïÑÔ¡£µ¥¼Ì³ÐÌåϵ±£Ö¤ÁËËùÓÐн¨µÄ»òJDKÖÐÒÑÓеÄÀ඼±ØÐë¼Ì³Ð×ÔOBJECT¡£ÕâÑù£¬±£Ö¤ÁËËùÓеÄÀ඼¾ßÓÐһЩ»ù±¾µÄ·½·¨¡£ÀýÈçÒ»¸öString¶ÔÏóÓÐtoString()·½·¨£¬ÁíÍâÒ»¸öMath¶ÔÏ ......

JAVAÂÒÂëÎÊÌâ»ã×Ü

ÎÄÕÂת×Ô:http://www.javaeye.com/topic/31742
---------------------------------------------------
ÂÒÂë¶ÔÓÚʹÓ÷ÇÓ¢ÓïÎÄ×Ö³ÌÐòÔ±»ù±¾ÉÏÊÇÒ»Ö±²øÈÆÔÚÉí±ßµÄÂ鷳ʣ¬Õâ¸öË­Ò²±ÜÃâ²»ÁË¡£ÏÂÃæÊÇÎÒ½â¾öÂÒÂëʱºòµÄÒ»µãС¾­Ñé¡£»¶Ó­Ö¸Õý
 
Ò»¡¢±ÜÃâÂÒÂëµÄһЩעÒâµã£º
1.¾¡Á¿Ê¹ÓÃͳһµÄ±àÂ룬Èç¹ûÄãÊÇÖØÍ·¿ª·¢Ò»¸öÏ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ