?? urldecodertest.java
字號:
import java.net.*;
/**
* Description:
* <br/>Copyright (C), 2008-2010, Yeeku.H.Lee
* <br/>This program is protected by copyright laws.
* <br/>Program Name:
* <br/>Date:
* @author Yeeku.H.Lee kongyeeku@163.com
* @version 1.0
*/
public class URLDecoderTest
{
public static void main(String[] args)
throws Exception
{
//將application/x-www-form-urlencoded字符串
//轉換成普通字符串
//其中的字符串直接從圖17.3所示窗口復制過來
String keyWord = URLDecoder.decode(
"%E6%9D%8E%E5%88%9A+j2ee", "UTF-8");
System.out.println(keyWord);
//將普通字符串轉換成
//application/x-www-form-urlencoded字符串
String urlStr = URLEncoder.encode(
"ROR敏捷開發(fā)最佳指南" , "GBK");
System.out.println(urlStr);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -