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

Java zip ½âѹËõAPI

²ÎÊý˵Ã÷
fileName£º ±íʾÏë½âѹµÄÎļþÃû   È磺c:\\aaa\a.zip
unZipDir£º  ±íʾÏë½âѹµ½µÄ·¾¶   È磺c:\\ccc
public static void unZip1(String fileName, String unZipDir) {
        try {
            File f = new File(unZipDir);
            if (!f.exists()) {
                f.mkdirs();
            }
            BufferedOutputStream dest = null;
            BufferedInputStream is = null;
            ZipEntry entry;
            ZipFile zipfile = new ZipFile(fileName);
            Enumeration e = zipfile.entries();
            while (e.hasMoreElements()) {
                entry = (ZipEntry) e.nextElement();
                if (entry.isDirectory()) {
                    makeDir(unZipDir + File.separator + entry.getName());
                } else {
                    is = new BufferedInputStream(zipfile.getInputStream(entry));
                    int count;
                    byte data[] = new byte[BUFFER];
             &nbs


Ïà¹ØÎĵµ£º

JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾


 
JAVA¿ª·¢Õß×ȥµÄ20¸öÓ¢ÎÄÍøÕ¾
1.[http://www.javaalmanac.com] – Java¿ª·¢ÕßÄê¼øÒ»ÊéµÄÔÚÏß°æ±¾. ÒªÏë¿ìËٲ鵽ijÖÖJava¼¼ÇɵÄÓ÷¨¼°Ê¾Àý´úÂë, ÕâÊÇÒ»¸ö²»´íµÄÈ¥´¦.
2.[http://www.onjava.com] – O’ReillyµÄJavaÍøÕ¾. ÿÖܶ¼ÓÐÐÂÎÄÕÂ.
3.[http://java.sun.com] – ¹Ù·½µÄJava¿ª·¢ÕßÍ ......

java Ä£Äâä¯ÀÀÆ÷

public static void DownLoadPages(String urlStr, String outPath)
     {
         int chByte = 0;
         URL url = null;
         HttpURLConnection httpConn ......

ÀûÓÃJava SwingÉè¼Æ±ê×¼¶Ô»°¿ò

SwingÖÐÌṩÁËJOptionPaneÀàÀ´ÊµÏÖÀàËÆWindowsƽ̨ϵÄMessageBoxµÄ¹¦ÄÜ£¬Í¬ÑùÔÚJavaÖÐÒ²ÓУ¬ÀûÓÃJOptionPaneÀàÖеĸ÷¸östatic·½·¨À´Éú³É¸÷ÖÖ±ê×¼µÄ¶Ô»°¿ò£¬ÊµÏÖÏÔʾ³öÐÅÏ¢¡¢Ìá³öÎÊÌâ¡¢¾¯¸æ¡¢Óû§ÊäÈë²ÎÊýµÈ¹¦ÄÜ¡£ÕâЩ¶Ô»°¿ò¶¼ÊÇģʽ¶Ô»°¿ò¡£
¡¡¡¡ConfirmDialog¡¡---¡¡È·È϶Ի°¿ò£¬Ìá³öÎÊÌ⣬ȻºóÓÉÓû§×Ô¼ºÀ´È·ÈÏ£¨°´"Ye ......

JavaÖÐÓÃË«»º³å¼¼ÊõÏû³ýÉÁ˸


ÔÚJava±àд¾ßÓÐÁ¬¹á±ä»¯µÄ´°¿Ú³ÌÐòʱ£¬Í¨³£µÄ°ì·¨ÊÇÔÚ×ÓÀàÖи²¸Ç¸¸ÀàµÄpaint(Graphics)·½·¨£¬ÔÚ·½·¨ÖÐʹÓÃGUIº¯ÊýʵÏÖ´°¿ÚÖØ»æµÄ¹ý³Ì¡£Á¬¹á±ä»»µÄ´°¿Ú»á²»¶ÏµØµ÷ÓÃupdate(Graphics)º¯Êý£¬¸Ãº¯Êý×Ô¶¯µÄµ÷ÓÃpaint(Graphics)º¯Êý¡£ÕâÑù¾Í»á³öÏÖÉÁ˸µÄÇé¿ö¡£
ΪÁ˽â¾öÕâÒ»ÎÊÌ⣬¿ÉÒÔÓ¦ÓÃË«»º³å¼¼Êõ¡£¿ÉÒÔͨ¹ý½ØÈ¡ÉÏÊö¹ý³Ì£¬¸ ......

¿ìËÙÅÅÐòËã·¨µÄJAVAʵÏÖ

package Utils.Sort;
/**
*¿ìËÙÅÅÐò£¬ÒªÇó´ýÅÅÐòµÄÊý×鱨ÐëʵÏÖComparable½Ó¿Ú
*/
public class QuickSort implements SortStrategy
{
       private static final int CUTOFF = 3;             //µ±ÔªËØÊý´óÓÚ´Ë ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ