Back to project page doubanbook4android.
The source code is released under:
Eclipse Public License - v 1.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECI...
If you think the Android project doubanbook4android listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.study.doubanbook_for_android.utils; //from ww w . j a v a 2s . co m import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; public class EncodeUtils { public static String encoder(String value) { // ??? String enUft = ""; String str = null; try { enUft = URLEncoder.encode(value, "UTF-8"); str = URLDecoder.decode(enUft, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return str; } public static String getEncodedStr(String s) { try { return URLEncoder.encode(s, "UTF-8"); } catch (UnsupportedEncodingException e) { e.printStackTrace(); return null; } } }