javaÓëc#ͨÐÅÊý¾Ýת»»ÎÊÌâ
//ÓÉÓÚJAVAÓïÑÔµÄÊý¾ÝÀàÐͶ¼ÊÇÓзûºÅÀàÐÍ£¬¶øC# C++Ò»°ãÊý¾ÝÀàÐͶ¼ÊÇ·ÖÓзûºÅºÍÎÞ·ûºÅ,
//Òò´ËÔÚͨÐŹý³ÌÖд«µÝµÄByte[]ÎÞ·¨Ö±½Óת»»³ÉC#ÐèÒªµÄÀàÐÍ£¬
//ÒÔÇ°µ¹ÊÇûעÒâÕâЩϸ½Ú£¬ÒòΪһ°ãÓÃÒ»ÖÖÓïÑÔ±à³Ì£¬
//´ó¶¼ÓÐÄÚÖõÄת»»·½·¨¡£¿çÓïÑÔ»·¾³µÄת»»¾ÍµÄ×Ô¼º¶¯ÊÖÏë°ì·¨ÁË¡£
1¡¢javaµÄByte[]ת»»³Éc#µÄInt32
private int CoverJavaByteToInt(byte[] bytes){
char[] chars = Encoding.ASCII.GetChars(bytes);
int r = 0;
r |= (((int)(chars[0])) & 0xff) << 24;
r |= (((int)(chars[1])) & 0xff) << 16;
r |= (((int)(chars[2])) & 0xff) << 8;
r |= (((int)(chars[3])) & 0xff);
return r;
}
2¡¢javaµÄByte[]ת³Éc#µÄunshort
private ushort CoverJavaByteToUnshort(byte[] bytes){
ushort r = 0;
char[] chars=Encoding.ASCII.GetChars(bytes);
r |= (ushort)((chars[0] & 0xff) << 8);
r |= (ushort)(chars[1] & 0xff) ;
return r;
}
´Ë´úÂë»á³öÏÖ´íÎóÔÚijЩÇé¿ö£¬´óÖÂÔÒòÊÇÒòΪת»»charʱֵÔâµ½¸Ä±ä£¬Ó¦¸ÃÊDZíʾ·¶Î§ÎÊÌâµ¼ÖÂ
private ushort CoverJavaByteToUnshort(byte[] bytes){
ushort r = 0;
r |= (ushort)((bytes[0] & 0xff) << 8);
r |= (ushort)(bytes[1] & 0xff);
return r;
}
´Ë´úÂëÄ¿Ç°²âÊÔûÎÊÌâÁË£¬Èç¹ûËÓöµ½ÌØÊâÇé¿ö ÇëÓëÎÒÁªÏµ
3¡¢javaµÄByte[]ת³Éc#µÄstring
£¨×¢Ò⣺ÎÒÕâ¸öº¯ÊýÊǸù¾ÝÎÒ¹¤×÷ÐèҪдµÄÒòΪ¿ÉÄÜ´æÔÚ¶à¸östring»òÆäËûÊý¾ÝÀàÐÍÔÚÕû¸öÊý¾ÝÁ÷ÖУ¬ÈçÄã½ÓÊÕµÄÊý¾ÝÁ÷¾ÍÊÇ×Ö·û´®£¬ÍêÈ«¿ÉÒÔûÕâôÂé·³£¬Çë×ÔÐÐÐ޸ģ©///
/// ת»»Byte[]µ½String ĬÈϲÉÓÃUTF-8///
/// Êý¾ÝÁ÷µÄBYTEÊý×é/// ×îÖÕת»»½á¹û×Ö·û´®
/// StringµÄÔÚÊý¾ÝÁ÷ÖеÄÆðʼλÖÃ
/// ÏÂÒ»¸öÊý¾ÝÀàÐÍÔÚÊý¾ÝÁ÷ÖеÄÆðʼλÖÃ
private int CoverJavaByteToString(byte[] bytes,ref string str,int indexStart){
byte[] uidLen = new byte[2];
Array.Copy(bytes,indexStart, uidLen, 0, 2);
ushort len = CoverJavaByteToUnshort(uidLen);
str = Encoding.UTF8.GetString(bytes,2+indexStart, len);
return str.Length+2+indexStart;
}
Ïà¹ØÎĵµ£º
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......
ÔÎÄ£ºDependency Injection in Java EE 6 – Part 1
×÷ÕߣºReza Rahman
³ö´¦£ºhttp://www.theserverside.com/tt/articles/article.tss?l=DependencyInjectioninJavaEE6
ÕâÒ»ÎÄÕÂϵÁнéÉÜÁËJava EEµÄÉÏÏÂÎĺÍÒÀÀµ×¢È루Contexts and Dependency Injection for Java EE£¬CDI£©£¬CDIÊǼ´½«Íê³ÉµÄJava EE 6Æ½Ì ......
ÏÈѧϰj2se
Ҫѧϰj2ee¾ÍÒªÏÈѧϰj2se£¬¸Õ¿ªÊ¼Ñ§Ï°j2seÏȽ¨Ò鲻ҪʹÓÃIDE£¬È»ºó½¥½¥µÄ¹ý¶Éµ½Ê¹ÓÃIDE¿ª·¢£¬±Ï¾¹ÓÃËü·½±ãÂѧϰj2seÍƼöÁ½±¾Ê飬¡¶java2ºËÐļ¼ÊõÒ»¶þ¾í¡·£¬¡¶java±à³Ì˼Ïë¡·£¬¡¶javaģʽ¡·¡£ÆäÖС¶java±à³Ì˼Ïë¡·ÒªÑжÁ£¬¾«¶Á¡£ÕâÒ»¶Îʱ¼äÊÇ»ù±¾¹¦Ñ§Ï°£¬Ê±¼ä»áºÜ³¤£¬Ò²¿ÉẠ̈ܺܶ¬ÕâÒª¿´Ñ§Ï°Õß×ÔÉíˮƽ¶ø ......
×î½ü¼¸Ìì,Ò»Ö±ÔÚÑо¿flex,˵¾äʵÔÚµÄ,ÆäÖеĿàÄÕ²»ÊÇÒ»¾ä»°Á½¾ä»°ÄÜ˵Çå³þµÄ.ûÓнӴ¥¹ý°¡!²»¹ýÏÖÔÚ×ÜËãÊÇ°ÑÊý¾Ý¿âÁ¬ÉÏÁË,×ö³öÁË×Ô¼ºÏëÒªµÄ¶«Î÷.·Ï»°ÉÙ˵,ÏÖÔÚÄØ,ÎҾͰÑÎÒ×öµÄ´úÂëÌù³öÀ´,¸ø´ó¼Ò¿´¿´,¶àÌᱦ¹óÒâ¼û.
ÎÒÓõÄÊÇjdbcµÄÁ¬½Ó·½Ê½(hibernateµÄÁ¬½Ó·½Ê½ÎÒ¿´ÍøÉÏÓÐ,ËùÒԾͲ»Ìù³öÀ´ÁË)
1.flex´úÂë
<?xml version ......