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

¹ØÓÚjavaÖÐurl±àÂëµÄÎÊÌâ

½ñÌìÓöµ½ÕâÑùµÄÎÊÌâ¡£ÐèÒªÏÂÔØÒ»¸öÎļþ£¬¸ÃÎļþµÄurlÈçÏ£º hxxp://www.abc.com/view/img/%E7%BD%91%E4%B8%8A%E8%B4%AD%E7%89%A9.rar   
  ´ËÁ´½ÓÔÚä¯ÀÀÆ÷Ï»áÖØ¶¨Ïòµ½±ðµÄÍøÕ¾¡£ËùÒÔÏÂÔØÏÂÀ´µÄÎļþ²¢·ÇÎÒÏëÒªµÄ¡£²éÁËÏÂÔ­À´ÊÇurl±àÂëºóµÄÎļþÃû¡£ÄÇôҪÏëÏÂÔØ¾Í±ØÐë¶ÔÕâ¸ö±àÂë½øÐнâÂë¡£¡£¡£¡£¡£
 ³ÌÐòºÜ¼òµ¥£¬java×Ô´ø±à½âÂëµÄ·½·¨£º
public class TestUrlCode {
    public static void main(String[] args){
        String keyWord = "hxxp://www.abc.com/view/img/%E9%BB%91%E7%99%BD%E6%97%A0%E5%B8%B8.rar
“;
        try {
            keyWord = URLDecoder.decode(keyWord, "UTF-8");
            System.out.println(keyWord);
            String urlStr = URLEncoder.encode("ºÚ°×ÎÞ³£", "UTF-8");
            System.out.println(urlStr);
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
    }
½á¹û  £º  hxxp://www.abc.com/view/img/ºÚ°×ÎÞ³£.rar
                %E9%BB%91%E7%99%BD%E6%97%A0%E5%B8%B8
¶Ô±ÈÀ´¿´ÒѾ­ÕýÈ·µÄ½«±àÂëת»»¹ýÀ´ÁË£­£­£­


Ïà¹ØÎĵµ£º

java jdbc µ÷Óà oracle´æ´¢¹ý³Ì ·µ»ØÓαê

1.´´½¨²âÊÔ±í
create table users(
userid int primary key,
username varchar2(20),
userpwd  varchar2(20)
);
insert into users values(1,'test','test');
insert into users values(2,'test','test');
insert into users values(3,'test','test');
insert into users values(4,'test','test');
insert i ......

JAVA±à³Ì¹æÔò

(1)   ÀàÃûÊ××ÖĸӦ¸Ã´óд¡£×ֶΡ¢·½·¨ÒÔ¼°¶ÔÏ󣨾ä±ú£©µÄÊ××ÖĸӦСд¡£¶ÔÓÚËùÓбêʶ·û£¬ÆäÖаüº¬µÄËùÓе¥´Ê¶¼Ó¦½ô¿¿ÔÚÒ»Æð£¬¶øÇÒ´óдÖм䵥´ÊµÄÊ××Öĸ¡£ÀýÈ磺  
  ThisIsAClassName  
  thisIsMethodOrFieldName  
  ÈôÔÚ¶¨ÒåÖгöÏÖÁ˳£Êý³õʼ»¯×Ö·û£¬Ôò´ ......

javaÖеÄURLEncoderºÍURLDecoderÀà

¡¾IT168 ¼¼ÊõÎĵµ¡¿
¡¡¡¡/*
¡¡¡¡ÍøÒ³ÖÐµÄ±íµ¥Ê¹ÓÃPOST·½·¨Ìύʱ£¬Êý¾ÝÄÚÈݵÄÀàÐÍÊÇ application/x-www-form-urlencoded£¬ÕâÖÖÀàÐͻ᣺
¡¡¡¡1.×Ö·û"a"-"z"£¬"A"-"Z"£¬"0"-"9"£¬"."£¬"-"£¬"*"£¬ºÍ"_" ¶¼²»»á±»±àÂë;
¡¡¡¡2.½«¿Õ¸ñת»»Îª¼ÓºÅ (+) ;
¡¡¡¡3.½«·ÇÎı¾ÄÚÈÝת»»³É"%xy"µÄÐÎʽ,xyÊÇÁ½Î»16½øÖƵÄÊýÖµ;
¡¡¡¡4.ÔÚ ......

³õʶJavaÃæÏò¶ÔÏóµÄÌØÐÔ

OOPµÄÌØÐÔÖ÷ÒªÓУº1¡¢·â×°£»2¡¢¼Ì³Ð£»3¡¢¶à̬¡£ÏÂÃæ´ÓÕ⼸¸ö·½Ãæ¾ßÌå²ûÊö¡£
1¡¢·â×°
·â×°Äܽ«ÀàµÄ¾ßÌåÐÅÏ¢Òþ²ØÆðÀ´£¬Ê¹µÃÊý¾ÝµÃµ½±£»¤¡£Æä¾ßÌåʵʩÖ÷ÒªÊÇÒÀ¿¿·ÃÎÊ¿ØÖÆ»úÖÆÈ¨ÏÞ£¬ÆäȨÏÞÖ÷ÒªÓÐËÄÖÖ£º1¡¢private£»2¡¢default£¨C++ûÓÐÕâÖÖȨÏÞ£©£»3¡¢protected£»4¡¢public¡£ÔÚÕâËÄÖÖȨÏÞϵÄÊý¾ÝÔÚÍâ½çµÄ¿É¼ûÐÔ²»Í¬¡£Private ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ