
devutility.internal.net.UrlCoderUtils Maven / Gradle / Ivy
package devutility.internal.net;
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
import java.net.URLEncoder;
public class UrlCoderUtils {
/**
* Encode url string
* @param value: Url string
* @return String
*/
public static String encode(String value) {
try {
return URLEncoder.encode(value, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
}
/**
* Decode url string
* @param value: Url string
* @return String
*/
public static String decode(String value) {
try {
return URLDecoder.decode(value, "UTF-8");
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy