»ñÈ¡ÆÕͨ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 Êý¾ÝÁ÷2(PipedInputStream,PipedOutputStream...)
2007-08-18 17:30
×Ö½ÚÁ÷µÄ¸ß¼¶Ó¦ÓÃ
? ¹ÜµÀÁ÷
¹ÜµÀÓÃÀ´°ÑÒ»¸ö³ÌÐò¡¢Ï̺߳ʹúÂë¿éµÄÊä³öÁ¬½Óµ½ÁíÒ»¸ö³ÌÐò¡¢Ï̺߳ʹúÂë¿éµÄÊäÈë¡£java.ioÖÐÌṩÁËÀàPipedInputStreamºÍPipedOutputStream×÷Ϊ¹ÜµÀµÄÊäÈë/Êä³öÁ÷
¹ÜµÀÊäÈëÁ÷×÷ ......
³éÏóÀàÍùÍùÓÃÀ´±íÕ÷ÎÒÃÇÔÚ¶ÔÎÊÌâÁìÓò½øÐзÖÎö¡¢ Éè¼ÆÖеóöµÄ³éÏó¸ÅÄÊǶÔһϵÁп´ÉÏÈ¥²»Í¬£¬µ«ÊDZ¾ÖÊÉÏÏàͬµÄ¾ßÌå¸ÅÄîµÄ³éÏó£¬ÎÒÃDz»ÄܰÑËüÃÇʵÀý»¯£¨Äò»³öÒ»¸ö¾ßÌåµÄ¶«Î÷£©ËùÒÔ³ÆÖ®Îª³éÏó¡£±ÈÈ磺ÎÒÃÇÒªÃèÊö“Ë®¹û”£¬Ëü¾ÍÊÇÒ»¸ö³éÏó£¬ËüÓÐÖÊÁ¿¡¢Ìå»ýµÈһЩ¹²ÐÔ£¨Ë®¹ûÓÐÖÊÁ¿£©£¬µ«ÓÖȱ·¦ÌØÐÔ£¨Æ»¹û¡¢ ......
±¾ÎÄת×Ôhttp://kingsui.javaeye.com/blog/154712
javaµ¼Èëµ¼³öexcel²Ù×÷(jxl)
Java½âÊÍExcelÊý¾Ý£¨jxl.jar°üµÄʹÓã©
¹Ø¼ü×Ö: java excel jxl.jar
jxl.jar °ü
ÏÂÔØµØÖ·:
http://www.andykhan.com/jexcelapi/
ÕæÊµÏÂÔØµØÖ·:
http://www.andykhan.com/jexcelapi/download.html
ÍøÕ¾É϶ÔËüµÄÌØÕ÷ÓÐÈçÏÂÃèÊö£ ......
×î½ü¸ãÒ»¸öÏîÄ¿ÐèÒª²Ù×÷Excel£¬googleÁËһϣ¬·¢ÏÖÓÐÁ½¸öµÚÈý·½¿ªÔ´Àà¿â£¬·Ö±ðÊÇJexcelºÍPoi¡£´ÖÂԵؿ´ÁËһϣ¬jexcelÄÚÈݲ»ÅӴ󣬾õ×ÅÎÒÖ»ÊÇÓÃһЩ»ù±¾µÄexcel¶Áд¹¦ÄÜ£¬ËüÓ¦¸ÃÄÜÂú×ãÒªÇó¡£ÏÂÃæ¼òÒªµÄ½éÉÜÒ»ÏÂÕâÁ½¸öÀà¿â¡£
jexcel£ºÔÚÓÃjexcelµÄ¹ý³ÌÖз¢ÏÖ¶ÁµÄËÙ ......