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

»ñÈ¡ÆÕͨJava¶ÔÏó´óС

»º´æ¶ÔÏóÐèÒªÖªµÀ¶ÔÏóÕ¼ÓÿռäµÄ´óС,¿ÉÒÔÊÂÏÈÉèÖúÃÿÖÖÀàÐ͵ĴóС,´Ë·½·¨¶ÔÆÕͨµÄ¶ÔÏóÆðЧ,JiveÂÛ̳ÖеĶÔÏóÒ²ÊDzÉÓÃÕâÖÖ°ì·¨À´»ñÈ¡¶ÔÏóµÄ´óСµÄ(È¡×ÔJive).
public class CacheSizes {
/**
* Returns the size in bytes of a basic Object. This method should only
* be used for actual Object objects and not classes that extend Object.
*
* @return the size of an Object.
*/
public static int sizeOfObject() {
return 4;
}
/**
* Returns the size in bytes of a String.
*
* @param string the String to determine the size of.
* @return the size of a String.
*/
public static int sizeOfString(String string) {
if (string == null) {
return 0;
}
return 4 + string.length()*2;
}
/**
* Returns the size in bytes of a primitive int.
*
* @return the size of a primitive int.
*/
public static int sizeOfInt() {
return 4;
}
/**
* Returns the size in bytes of a primitive char.
*
* @return the size of a primitive char.
*/
public static int sizeOfChar() {
return 2;
}
/**
* Returns the size in bytes of a primitive boolean.
*
* @return the size of a primitive boolean.
*/
public static int sizeOfBoolean() {
return 1;
}
/**
* Returns the size in bytes of a primitive long.
*
* @return the size of a primitive long.
*/
public static int sizeOfLong() {
return 8;
}
/**
* Returns the size in bytes of a primitive double.
*
* @return the size of a primitive double.
*/
public static int sizeOfDouble() {
return 8;
}
/**
* Returns the size in bytes of a Date.
*
* @return the size of a Date.
*/
public static int sizeOfDate() {
return 12;
}
/**
* Returns the size in bytes of a Properties object


Ïà¹ØÎĵµ£º

JAVAϵͳºÍDOMINOͨ¹ýLDAP¼¯³É·½

LDAPÊDZê×¼ÇáÁ¿Ä¿Â¼·ÃÎÊЭÒé(Lightweight Directory Access Protocol)£¬Í¨¹ýLDAP£¬Äã¿ÉÒÔ·ÃÎÊĿ¼ÖеÄÓû§ÐÅÏ¢£¬½øÐÐÓû§ÑéÖ¤¡£DominoR5/6Ö§³Ö±ê×¼µÄLDAP v3Ŀ¼·þÎñ¡£±¾ÎÄͨ¹ýÃèÊöʹÓÃJNDI·ÃÎÊDominoĿ¼µÄ¹ý³Ì£¬Îª´ó¼Ò½éÉÜÈçºÎ³ä·ÖÀûÓûú¹¹ÖÐÒÑÓеÄDominoĿ¼×ÊÔ´¡£±¾ÎÄËùÊöµÄ·½·¨Ò²ÊÊÓÃÓÚÆäËûÖ§³ÖLDAP v3µÄĿ¼·þÎñÆ÷¡£ ......

Àí½âJAVAÖеĽӿںͳéÏóÀà

  ³éÏóÀàÍùÍùÓÃÀ´±íÕ÷ÎÒÃÇÔÚ¶ÔÎÊÌâÁìÓò½øÐзÖÎö¡¢ Éè¼ÆÖеóöµÄ³éÏó¸ÅÄÊǶÔһϵÁп´ÉÏÈ¥²»Í¬£¬µ«ÊDZ¾ÖÊÉÏÏàͬµÄ¾ßÌå¸ÅÄîµÄ³éÏó£¬ÎÒÃDz»ÄܰÑËüÃÇʵÀý»¯£¨Äò»³öÒ»¸ö¾ßÌåµÄ¶«Î÷£©ËùÒÔ³ÆÖ®Îª³éÏó¡£±ÈÈ磺ÎÒÃÇÒªÃèÊö“Ë®¹û”£¬Ëü¾ÍÊÇÒ»¸ö³éÏó£¬ËüÓÐÖÊÁ¿¡¢Ìå»ýµÈһЩ¹²ÐÔ£¨Ë®¹ûÓÐÖÊÁ¿£©£¬µ«ÓÖȱ·¦ÌØÐÔ£¨Æ»¹û¡¢ ......

ÈÏʶÀí½âJavaÖÐnative·½·¨

Java²»ÊÇÍêÃÀµÄ£¬JavaµÄ²»×ã³ýÁËÌåÏÖÔÚÔËÐÐËÙ¶ÈÉÏÒª±È´«Í³µÄC++ÂýÐí¶àÖ®Í⣬JavaÎÞ·¨Ö±½Ó·ÃÎʵ½²Ù×÷ϵͳµ×²ã£¨ÈçϵͳӲ¼þµÈ)£¬Îª´ËJavaʹÓÃnative·½·¨À´À©Õ¹Java³ÌÐòµÄ¹¦ÄÜ¡£
¡¡¡¡¿ÉÒÔ½«native·½·¨±È×÷Java³ÌÐòͬ£Ã³ÌÐòµÄ½Ó¿Ú£¬ÆäʵÏÖ²½Ö裺
¡¡¡¡£±¡¢ÔÚJavaÖÐÉùÃ÷native()·½·¨£¬È»ºó±àÒ룻
¡¡¡¡£²¡¢ÓÃjavah²úÉúÒ»¸ö.h ......

javaͨ¹ý»º³åÇøÌá¸ßI/OÐÔÄÜ

 ÎÒÃÇÖªµÀJavaÖÐÒ»°ãµÄÊäÈëÊä³öÁ÷Àà¶¼ÊÇÓõ¥×ֽڵĶÁÈ¡·½·¨À´½øÐÐI/O²Ù×÷µÄ£¬Ò²¾ÍÊÇ˵ÿ´ÎÖ»¶Áдһ¸ö×Ö½ÚµÄÊý¾Ý£¬ÕâÖÖ·½·¨ÏÔÈ»·±ËöµÍЧ¡£Èç¹û´ÓÉ豸¶ÁÈ¡10MµÄÎļþ£¬Ã¿´Î¶Áȡһ¸ö×Ö½Ú£¬Íê³É²Ù×÷½«ÐèÒª×ö10M/´ÎI/O²Ù×÷£¬I/O²Ù×÷ÓÖÊÇÒ»¼þÏ൱ºÄʱµÄÊÂÇ飬ÎÞÒÉÔںܴó³Ì¶ÈÉϽµµÍÁËϵͳµÄÐÔÄÜ¡£
    JavaÖÐ× ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ