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

ÓÃjavaѹËõÎļþ¼Ð/Îļþ

 Ñ¹ËõÎļþ¼Ð´úÂ룺
import java.io.File;
import org.apache.tools.zip.ZipOutputStream; //Õâ¸ö°üÔÚant.jarÀҪµ½¹Ù·½ÍøÏÂÔØ
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.zip.ZipInputStream;
import java.util.zip.ZipEntry;
public class CompressBook {
    public CompressBook() {}
    /**//*
    * inputFileName ÊäÈëÒ»¸öÎļþ¼Ð
    * zipFileName Êä³öÒ»¸öѹËõÎļþ¼Ð
    */
    public void zip(String inputFileName) throws Exception {
        String zipFileName = "c:\\test.zip"; //´ò°üºóÎļþÃû×Ö
        System.out.println(zipFileName);
        zip(zipFileName, new File(inputFileName));
    }
    private void zip(String zipFileName, File inputFile) throws Exception {
        ZipOutputStream out = new ZipOutputStream(new FileOutputStream(zipFileName));
        zip(out, inputFile, "");
        System.out.println("zip done");
        out.close();
    }
    private void zip(ZipOutputStream out, File f, String base) throws Exception {
        if (f.isDirectory()) {
           File[] fl = f.listFiles();
          &nbs


Ïà¹ØÎĵµ£º

javaÈëÃÅ

 Javaѧϰ´ÓÈëÃŵ½¾«Í¨ 
Ò»¡¢ JDK (Java Development Kit) 
JDKÊÇÕû¸öJavaµÄºËÐÄ£¬°üÀ¨ÁËJavaÔËÐл·¾³£¨Java Runtime Envirnment£©£¬Ò»¶ÑJava¹¤¾ßºÍJava»ù´¡µÄÀà¿â(rt.jar)¡£²»ÂÛʲôJavaÓ¦Ó÷þÎñÆ÷ʵÖʶ¼ÊÇÄÚÖÃÁËij¸ö°æ±¾µÄJDK¡£Òò´ËÕÆÎÕJDKÊÇѧºÃJavaµÄµÚÒ»²½¡£×îÖ÷Á÷µÄJ ......

sql 2005 ´æ´¢¹ý³Ì·ÖÒ³ java ´úÂë

 create PROCEDURE pagelist
@tablename nvarchar(50),
@fieldname nvarchar(50)='*',         
@pagesize int output,--ÿҳÏÔʾ¼Ç¼ÌõÊý
@currentpage int output,--µÚ¼¸Ò³
@orderid nvarchar(50),--Ö÷¼üÅÅÐò
@sort int,--ÅÅÐò·½Ê½£¬1±íʾÉýÐò£¬0±íʾ½µÐòÅÅÁÐ ......

Java NIO APIÏê½â

 
Java NIO APIÏê½â
ÔÚJDK
1.4ÒÔÇ°£¬JavaµÄIO²Ù×÷¼¯ÖÐÔÚjava.ioÕâ¸ö°üÖУ¬ÊÇ»ùÓÚÁ÷µÄ×èÈû£¨blocking£©API¡£¶ÔÓÚ´ó¶àÊýÓ¦ÓÃÀ´Ëµ£¬ÕâÑùµÄAPIʹÓúܷ½
±ã£¬È»¶ø£¬Ò»Ð©¶ÔÐÔÄÜÒªÇó½Ï¸ßµÄÓ¦Óã¬ÓÈÆäÊÇ·þÎñ¶ËÓ¦Óã¬ÍùÍùÐèÒªÒ»¸ö¸üΪÓÐЧµÄ·½Ê½À´´¦ÀíIO¡£´ÓJDK 1.4Æð£¬NIO
API×÷Ϊһ¸ö»ùÓÚ»º³åÇø£¬²¢ÄÜÌṩ·Ç×èÈû(non-blo ......

javaÖÐyield(),sleep()ÒÔ¼°wait()µÄÇø±ð

 ÍùÍù»ìÏýÁËÕâÈý¸öº¯ÊýµÄʹÓá£
´Ó²Ù×÷ϵͳµÄ½Ç¶È½²£¬os»áά»¤Ò»¸öready queue£¨¾ÍÐ÷µÄÏ̶߳ÓÁУ©¡£²¢ÇÒÔÚijһʱ¿ÌcpuֻΪready queueÖÐλÓÚ¶ÓÁÐÍ·²¿µÄÏ̷߳þÎñ¡£
µ«Êǵ±Ç°ÕýÔÚ±»·þÎñµÄÏ߳̿ÉÄܾõµÃcpuµÄ·þÎñÖÊÁ¿²»¹»ºÃ£¬ÓÚÊÇÌáÇ°Í˳ö£¬Õâ¾ÍÊÇyield¡£
»òÕßµ±Ç°ÕýÔÚ±»·þÎñµÄÏß³ÌÐèҪ˯һ»á£¬ÐÑÀ´ºó¼ÌÐø±»·þÎñ£¬Õâ¾ÍÊ ......

JAVA±à³ÌÌâ

1£®ÏÖÔÚÊäÈën¸öÊý×Ö£¬ÒÔ¶ººÅ£¬·Ö¿ª£»È»ºó¿ÉÑ¡ÔñÉý»òÕß½µÐòÅÅÐò£»°´Ìá½»¼ü¾ÍÔÚÁíÒ»Ò³ÃæÏÔʾ°´Ê²Ã´ÅÅÐò£¬½á¹ûΪ£¬Ìṩreset
import java.util.*;
public class bycomma{
 public static String[] splitStringByComma(String source){
   if(source==null||source.trim().equals(""))
    ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ