java decode(解码) encode(译码)

try {
			 
				String url = " ]]>";
			 
				String encodedUrl = URLEncoder.encode(url, "UTF-8");
			 
				System.out.println("Encoded URL " + encodedUrl);
			 
				String decodedUrl = URLDecoder.decode(encodedUrl, "UTF-8");
			 
				System.out.println("Dncoded URL " + decodedUrl);
			 
				} catch (UnsupportedEncodingException e) {
			 
					System.err.println(e);
			 
				}
		}

你可能感兴趣的:(杂七杂八)