Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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Á¬½ÓSQL Server 2000

Êý¾Ý¿â²Ù×÷ÏÖÔÚÊÇÏîÄ¿¿ª·¢µÄ¸ù±¾£¬Ñ§Ï°JavaÊ×ÏÈÓ¦¸Ãѧ»áÔõôÑùÁ¬½ÓÊý¾Ý¿â£¬ÓÃJavaÁ¬½ÓÊý¾Ý¿â¿É²»ÏñÓÃDelphiÕâÀ๤¾ßÄÇÑùÉ輸¸öÊôÐÔ¾ÍOK£¬Ëµ¼òµ¥Ò²¼òµ¥£¬Ëµ¸´ÔÓ£¬ÆäʵҲͦ¸´Ôӵģ¬¶øÇÒºÜÂé·³£¬Èç¹ûÊdzõѧ£¬¸ù±¾²»Äܱ£Ö¤µÚÒ»´Î¾ÍÁ¬½Ó³É¹¦£¬ÏÂÃæÒÔSQL Server 2000ΪÀý£¬ËµËµJavaÁ¬½ÓÊý¾Ý¿âµÄ»ù±¾·½·¨£¬Ò²¼Ç¼һÏÂÐĵá£
1¡¢Ï ......

javaÈÕÆÚÓÐЧÐÔÑéÖ¤

 private static boolean isValidDate(String strValue ) {//20091001×Ö·û´® 
     
   int d = Integer.parseInt(strValue.substring(6, 8));
   int m = Integer.parseInt(strValue.substring(4, 6));
   int y = Integer.parseInt(strValue.subst ......

JAVA¿ªÔ´¹¤×÷Á÷

    Willow
ÓÉHuihoo Power¿ª·¢Ïêϸ¿Éµ½ÆäÖÐÎÄÖ÷Ò³²é¿´¡£
¸ü¶àWillowÐÅÏ¢
OpenWFE
OpenWFEÊÇÒ»¸ö¿ª·ÅÔ´ÂëµÄJava¹¤×÷Á÷ÒýÇæ¡£ËüÊÇÒ»¸öÍêÕûµÄÒµÎñ´¦Àí¹ÜÀíÌ×¼þ£ºÒ»¸öÒýÇ棬һ¸ö¹¤×÷ÁÐ±í£¬Ò»¸öWeb½çÃæºÍÒ»¸ö·´Ó¦Æ÷£¨´æ·Å×Ô¶¯´úÀí£©¡£Ëü¿ÉÒÔ¿ÉÒÔ¸úÄãµÄ³ÌÐòºÜºÃµÄ¸øºÏ¡£
¸ü¶àOpenWFEÐÅÏ¢
jBpm
jBpmÊÇÒ»¸ö ......

°Ë javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(¹¹Ôì·½·¨)

°Ë javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(¹¹Ôì·½·¨)
/**
 * ÃæÏò¶ÔÏóÖ®¶þ
 * ¹¹Ôì·½·¨(¹¹Ôì»ú):
 *
 * 1,¹¹Ôì·½·¨µÄÌØÕ÷:
 * Ëü¾ßÓÐÓëÀàÏàͬµÄÃû³Æ£»
 * Ëü²»º¬·µ»ØÖµ£»
 * Ëü²»ÄÜÔÚ·½·¨ÖÐÓÃreturnÓï¾ä·µ»ØÒ»¸öÖµ
 * ×¢Ò⣺ÔÚ¹¹Ôì·½·¨Àï²»º¬·µ»ØÖµµÄ¸ÅÄîÊDz»Í¬ÓÚ“void&rdquo ......

ʮһ javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(µ¥Ì¬Éè¼Æģʽ)

ʮһ javaÃæÏò¶ÔÏó³ÌÐòÉè¼Æ(µ¥Ì¬Éè¼Æģʽ)
/**
 * ÃæÏò¶ÔÏóÖ®Áù
 * µ¥Ì¬Ä£Ê½Éè¼Æ
 * ËùνÀàµÄµ¥Ì¬Éè¼Æģʽ£¬¾ÍÊDzÉÈ¡Ò»¶¨µÄ·½·¨±£Ö¤ÔÚÕû¸öµÄÈí¼þϵͳÖУ¬¶Ôij¸öÀàÖ»ÄÜ´æÔÚÒ»¸ö¶ÔÏóʵÀý£¬
 * ²¢ÇÒ¸ÃÀàÖ»Ìṩһ¸öÈ¡µÃÆä¶ÔÏóʵÀýµÄ·½·¨¡£
 */
class Single
{
 private static int coun ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ