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

¼¸ÖÖ¶ÁÈ¡ÊôÐÔÎļþµÄJAVAʵÏÖ·½Ê½

 1.ʹÓÃjava.util.PropertiesÀàµÄload()·½·¨
¡¡¡¡
¡¡¡¡Ê¾Àý£º
Java´úÂë
InputStream in = lnew BufferedInputStream(new FileInputStream(name));   
¡¡¡¡Properties p = new Properties();   
¡¡¡¡p.load(in);  
InputStream in = lnew BufferedInputStream(new FileInputStream(name));
¡¡¡¡Properties p = new Properties();
¡¡¡¡p.load(in);
¡¡¡¡
¡¡¡¡2.ʹÓÃjava.util.ResourceBundleÀàµÄgetBundle()·½·¨¡¡¡¡
¡¡¡¡Ê¾Àý£º
Java´úÂë
ResourceBundle rb = ResourceBundle.getBundle(name, Locale.getDefault());  
ResourceBundle rb = ResourceBundle.getBundle(name, Locale.getDefault());
¡¡¡¡
¡¡¡¡3.ʹÓÃjava.util.PropertyResourceBundleÀàµÄ¹¹Ô캯Êý¡¡¡¡
¡¡¡¡Ê¾Àý£º
Java´úÂë
InputStream in = new BufferedInputStream(new FileInputStream(name));   
¡¡¡¡ResourceBundle rb = new PropertyResourceBundle(in);  
InputStream in = new BufferedInputStream(new FileInputStream(name));
¡¡¡¡ResourceBundle rb = new PropertyResourceBundle(in);
¡¡¡¡
¡¡¡¡4.ʹÓÃclass±äÁ¿µÄgetResourceAsStream()·½·¨¡¡¡¡
¡¡¡¡Ê¾Àý£º
Java´úÂë
InputStream in = JProperties.class.getResourceAsStream(name);   
¡¡¡¡Properties p = new Properties();   
¡¡¡¡p.load(in);  
InputStream in = JProperties.class.getResourceAsStream(name);
¡¡¡¡Properties p = new Properties();
¡¡¡¡p.load(in);
¡¡¡¡
¡¡¡¡5.ʹÓÃclass.getClassLoader()ËùµÃµ½µÄjava.lang.ClassLoaderµÄgetResourceAsStream()·½·¨¡¡¡¡
¡¡¡¡Ê¾Àý£º
Java´úÂë
InputStream in = JProperties.class.getClassLoader().getResourceAsStream(name);   
¡¡¡¡Properties p = new Properties();   
¡¡¡¡p.load(in);  
InputStream in = JProperties.class.getClassLoader().getResourceAsStream(name);
¡¡¡¡Properties p = new Properties();
¡¡¡¡p.load(in);
¡¡¡¡
¡¡¡¡6.ʹÓÃjava.lang.ClassLoad


Ïà¹ØÎĵµ£º

Äêµ×ÊÕ²ØÏµÁÐ Java°²È«¹¤¾ß,Éú³ÉMD5,Base64,UUID


/*
* EncryptUtils.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* ......

Äêµ×ÊÕ²ØÏµÁÐ Java Web¹¤¾ßCookieSupport

/*
* CookieSupport.java
* Copyright (C) 2007-3-19 <JustinLei@gmail.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version ......

12.18 javaÖеÄview£¬ibatis dao

JavaÄÚ²¿À൱³õµÄÉè¼ÆÄ¿µÄÓ¦¸ÃÊÇʵÏÖ¶àÖØ¼Ì³Ð£¬ºóÀ´·¢ÏÖÄÚ²¿À໹´øÀ´ÁËÆäËûºÃ´¦£¬Èç¿ÉÒÔʹÓÃÄÚ²¿Àà°üװһЩº¯Êý£¬ÊµÏÖº¯Êý¼¶±ðµÄȨÏÞ¿ØÖƵȡ£
     JavaÖУ¬LIst.subList()µÈ·½·¨²úÉúµÄÊÇÒ»¸öview£¬¼´²»ÊÇ´«Öµ£¬¶ø½öÊÇÒýÓá£ËƺõÔÚjavaÖгýÁËprimitiveÀ࣬ÆäËûÀà¶¼Ðènew²ÅÄܲúÉúжÔÏó¡£
iBatis DAO¿ò¼ÜÍ ......

¹ØÓÚJavaÖи÷ÖÖÐÞÊηûÓë·ÃÎÊÐÞÊηûµÄ˵Ã÷

Àࣺ
·ÃÎÊÐÞÊηû ÐÞÊηû class ÀàÃû³Æ extends ¸¸ÀàÃû³Æ implement ½Ó¿ÚÃû³Æ
£¨·ÃÎÊÐÞÊηûÓëÐÞÊηûµÄλÖÿÉÒÔ»¥»»£©
·ÃÎÊÐÞÊηû
Ãû³Æ
˵Ã÷
±¸×¢
public
¿ÉÒÔ±»ËùÓÐÀà·ÃÎÊ£¨Ê¹Óã©
publicÀà±ØÐ붨ÒåÔÚºÍÀàÃûÏàͬµÄͬÃûÎļþÖÐ
package
¿ÉÒÔ±»Í¬Ò»¸ö°üÖеÄÀà·ÃÎÊ£¨Ê¹Óã©
ĬÈϵķÃÎÊȨÏÞ£¬¿ÉÒÔÊ¡ÂԴ˹ؼ ......

java³£¿¼µÄ¼¸¸öÅÅÐò

1.дһ¸öðÅÝÅÅÐòµÄ³ÌÐò¡£
        public class Sort
{
         public static void main(String[] args)
         {
           &n ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ