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

javaѹËõÎļþ³Étar.gz¸ñʽ

ʹÓÃant.jar°ü£¨1.6°æ±¾£©£¬Íê³ÉtarµÄ´ò°ü¹¦ÄÜ£¬Ö±½ÓÌù´úÂë
import java.io.BufferedOutputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.GZIPOutputStream;
import org.apache.tools.tar.TarEntry;
import org.apache.tools.tar.TarOutputStream;
/*
* ¹¦ÄÜ£ºÑ¹ËõÎļþ³Étar.gz¸ñʽ
*/
public class TarUtils
{
private static int BUFFER = 1024*4; //»º³å´óС
private static byte[] B_ARRAY = new byte[BUFFER];
/*
* ·½·¨¹¦ÄÜ£º´ò°üµ¥¸öÎļþ»òÎļþ¼Ð
* ²ÎÊý£ºinputFileName Òª´ò°üµÄÎļþ¼Ð»òÎļþµÄ·¾¶
* targetFileName ´ò°üºóµÄÎļþ·¾¶
*/
public void execute(String inputFileName, String targetFileName)
{
File inputFile = new File(inputFileName);
String base = inputFileName
.substring(inputFileName.lastIndexOf("/") + 1);
TarOutputStream out = getTarOutputStream(targetFileName);
tarPack(out, inputFile, base);
try
{
if (null != out)
{
out.close();
}
} catch (IOException e)
{
e.printStackTrace();
}
compress(new File(targetFileName));
}
/*
* ·½·¨¹¦ÄÜ£º´ò°ü¶à¸öÎļþ»òÎļþ¼Ð
* ²ÎÊý£ºinputFileNameList Òª´ò°üµÄÎļþ¼Ð»òÎļþµÄ·¾¶µÄÁбí
* targetFileName ´ò°üºóµÄÎļþ·¾¶
*/
public void execute(List<String> inputFileNameList, String targetFileName)
{
TarOutputStream out = getTarOutputStream(targetFileName);

for(String inputFileName : inputFileNameList)
{
File inputFile = new File(inputFileName);
String base = inputFileName
.substring(inputFileName.lastIndexOf("/") + 1);
tarPack(out, inputFile, base);
}
try
{
if (null != out)
{
out.close();
}
} catch (IOException e)
{
e.printStackTrace();
}
compress(new File(targetFileName));
}
/*
* ·½·¨¹¦ÄÜ£º´ò°ü³ÉtarÎļþ
* ²ÎÊý£ºout ´ò°üºóÉú³ÉÎļþµÄÁ÷
* inputFile ҪѹËõµÄÎļ


Ïà¹ØÎĵµ£º

javaµ¼Èëµ¼³öexcel²Ù×÷(jxl)


±¾ÎÄת×Ô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
ÍøÕ¾É϶ÔËüµÄÌØÕ÷ÓÐÈçÏÂÃèÊö£ ......

javaÉè¼Æģʽ ²ßÂÔģʽ

¶¨Òå:¶¨ÒåÁËËã·¨×壬·Ö±ð·â×°ÆðÀ´£¬ÈÃËüÃÇÖ®¼ä¿ÉÒÔ»¥ÏàÌæ»»£¬´ËģʽÈÃËã·¨µÄ±ä»¯¶ÀÁ¢ÓÚʹÓÃËã·¨µÄ¿Í»§¡£
ÊÊÓÃÐÔ
Ðí¶àÏà¹ØµÄÀà½ö½öÊÇÐÐΪÓÐÒì¡£“²ßÂÔ”ÌṩÁËÒ»ÖÖÓöà¸öÐÐΪÖеÄÒ»¸öÐÐΪÀ´ÅäÖÃÒ»¸öÀàµÄËã·¨¡£
ÐèҪʹÓÃÒ»¸öËã·¨µÄ²»Í¬±äÌå¡£ÀýÈ磬Äã¿ÉÄܻᶨÒåһЩ·´Ó³²»ÈݵĿռä/ʱ¼äȨºâµÄËã·¨¡£µ±ÕâЩ±äÌåʵ ......

[ת]´óÐÍJava WebϵͳѡÐÍÎÊÌâ̽ÌÖ

Ô­ÎÄÁ´½Ó£ºhttp://www.infoq.com/cn/news/2007/09/java_web_architecture_turnning
×÷Õß ÌïÀÖ ·¢²¼ÓÚ 2007Äê9ÔÂ17ÈÕ ÉÏÎç9ʱ24·Ö
һλIDÊÇjackson1225µÄÍøÓÑÔÚJavaEyeѯÎÊÁËÒ»¸ö´óÐÍWebϵͳµÄ¼Ü¹¹ºÍ²¿ÊðÑ¡ÐÍÎÊÌ⣬ϣÍûÄÜÌá¸ßÏÖÓеĻùÓÚJavaµÄWebÓ¦ÓõķþÎñÄÜÁ¦¡£ÓÉÓڼܹ¹Ä£Ê½ºÍ²¿Êðµ÷ÓÅÒ»Ö±ÊÇJavaÉçÇøµÄÈÈÃÅ»°Ì⣬Õâ¸öÎÊ ......

JavaÐéÄâ»ú²ÎÊý XXµÈÏà¹Ø²ÎÊýÓ¦ÓÃ

ͨ³££¬ÎÒÃÇΪÁ˱ÜÃâÄÚ´æÒç³öµÈÎÊÌ⣬ÐèÒªÉèÖû·¾³±äÁ¿
JAVA_OPTS    -Xms256M -Xmx512M µÈ£¬¡¾¶ÔÓÚ·þÎñÆ÷£¬Ò»°ã¶¼ÉèÖóÉÒ»ÑùµÄ¡¿
µ«ÊÇÓеÄʱºò¿ÉÄÜÕâÑùµÄÉèÖû¹»á²»ÐÐ(±ÈÈ磬µ±ServerÓ¦ÓóÌÐò¼ÓÔؽ϶àÀàʱ£¬¼´jvm¼ÓÔØÀàʱ£¬ÓÀ¾ÃÓòÖеĶÔÏó¼±¾çÔö¼Ó£¬´Ó¶øʹjvm²»¶Ïµ÷ÕûÓÀ¾ÃÓò´óС£¬ÎªÁ˱ÜÃâµ÷Õû)£¬Äã¿ÉÒÔʹ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ