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

JAVA±éÀúÒ»¸öÎļþ¼ÐÖеÄËùÓÐÎļþ

ÔÚʵ¼ÊÏîÄ¿Öиø¶¨Ò»Îļþ¼Ð£¬µÃµ½Õâ¸öÎļþ¼ÐÏÂËùÓеÄÎļþÕâÑùµÄÐèÇó²¢²»ÊǺܶ࣬¸ü¶àµÄÊDzéÕÒ»òÊÇɾ³ýijһ¾ßÌåµÄÎļþ
import java.io.File;
import java.util.ArrayList;
public class FileTest {
 private static ArrayList<String> filelist = new ArrayList<String>();
 
 public static void main(String[] args) throws Exception {
   
    String filePath = "E:\\Struts2";
    getFiles(filePath);
 } 
 /*
  * ͨ¹ýµÝ¹éµÃµ½Ä³Ò»Â·¾¶ÏÂËùÓеÄĿ¼¼°ÆäÎļþ
  */
 static void getFiles(String filePath){
  File root = new File(filePath);
    File[] files = root.listFiles();
    for(File file:files){    
     if(file.isDirectory()){
      /*
       * µÝ¹éµ÷ÓÃ
       */
      getFiles(file.getAbsolutePath());
      filelist.add(file.getAbsolutePath());
      System.out.println("ÏÔʾ"+filePath+"ÏÂËùÓÐ×ÓĿ¼¼°ÆäÎļþ"+file.getAbsolutePath());
     }else{
      System.out.println("ÏÔʾ"+filePath+"ÏÂËùÓÐ×ÓĿ¼"+file.getAbsolutePath());
     }    
    }
 }
}


Ïà¹ØÎĵµ£º

java¸÷°æ±¾ÏÂÔصØÖ·

 ×î½ü×öjava¿Í»§¶Ë jre+installanywhere+jar ´ò°ü·¢²¼.exe°²×°¿Í»§¶Ë¡£´ò°ü³öÀ´ÎÞÄÎjreÌ«´óbeta°æ³ÌÐòÖ»Óм¸°Ùk ¿ÉÊÇjre´ò°üÏÂÀ´Óн«½ü30M£¬ÔÚÍøÉÏËÑË÷¾«¼ò°æ¿Í»§¶Ë£¬¿ÉÊǰ汾ȷʵ̫¾«¼òÁËÓÐЩÀàûÓУ¬¶øÕâ°æ±¾ÓÖºÍ×Ô¼º×°µÄ°æ±¾Óв»Í¬£¬ÔÚÍøÉÏÕÒÑ°°ëÌì²»µÃjreµÄ¾É°æ±¾×îºóÖÕÓÚÕÒµ½£¬ÕâÀïÌṩµØÖ·£¨java¸÷°æ±¾ÏÂÔصØÖ·£ ......

JavaÖÐHashMapʹÓÃ×Ô¶¨ÒåKeyÀà

×Ô¶¨ÒåµÄKeyÀàÐèÒªÖØÔØequals, hashCodeº¯Êý¡£¡£ 
package com.albert.test;
import java.util.Vector;
import java.util.HashMap;
/**
* @author tough_guy
*
*/
//¶ÔÓÚ×Ô¶¨ÒåµÄkey£¬ ÐèÒªÖØÔØhashCodeº¯ÊýºÍequalsº¯Êý
class IPSegment
{
long ip_s;
long ip_e;
int p;
IPSegment Reset(long f ......

RabbitÁ÷ÃÜÂëµÄJavaʵÏÖ

1. RabbitÁ÷ÃÜÂ루Rabbit Stream Cipher£©¼ò½é
      RabbitÁ÷ÃÜÂëÊÇÓÉCryptico¹«Ë¾£¨http://www.cryptico.com£©Éè¼ÆµÄ£¬ÃÜÔ¿³¤¶È128룬
×î´ó¼ÓÃÜÏûÏ¢³¤¶ÈΪ264 Bytes£¬¼´16 TB£¬ÈôÏûÏ¢³¬¹ý¸Ã³¤¶È£¬ÔòÐèÒª¸ü»»ÃÜÔ¿¶ÔʣϵÄÏûÏ¢½øÐд¦Àí¡£ËüÊÇÄ¿Ç°°²È«ÐԽϸߣ¬¼Ó/½âÃÜËٶȱȽϸßЧµÄÁ÷ÃÜÂëÖ®Ò»£ ......

java¶ÁÈ¡xmlÎļþµÄËÄÖÖ·½·¨

xmlÎļþ£º
Xml´úÂë
<?xml version="1.0" encoding="GB2312"?>  
<RESULT>  
 <VALUE>¡¡¡¡   
  <NO>A1234</NO>¡¡¡¡   
  <ADDR>ºÓÄÏÊ¡Ö£ÖÝÊÐ</ADDR>  
 </VALUE>&nbs ......

javaÖеõ½µ±Ç°Â·¾¶µÄ·½·¨


¹éÄÉһЩÍøÉÏÈ¡JAVA·¾¶µÄ·½·¨£º
×¢Ã÷£ºÈç¹û´ÓANTÆô¶¯³ÌÐò£¬this.getClass().getResource("")È¡³öÀ´µÄ±È½Ï¹Ö£¬Ö±½ÓÓÃJAVAÃüÁîÐе÷ÊԾͿɳɹ¦¡£
µÃµ½classpathºÍµ±Ç°ÀàµÄ¾ø¶Ô·¾¶µÄһЩ·½·¨
»ñµÃCLASSPATHÖ®Íâ·¾¶µÄ·½·¨£º
URL base = this.getClass£¨£©.getResource£¨""£©£» //ÏÈ»ñµÃ±¾ÀàµÄËùÔÚλÖã¬Èç/home/popeye/ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ