51 java URLEncoding URLDecoding

452 단어
import java.net.URLDecoder;
import java.net.URLEncoder;


public class URLDecoderTest {

	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		String keyword=URLDecoder.decode("%B7%E8%BF%F1java", "GBK");
		System.out.println(keyword);//  java
		
		String word=URLEncoder.encode("  ", "GBK");
		System.out.println(word);//%C4%E3%BA%C3
	}

}

좋은 웹페이지 즐겨찾기