Class SafeEncode


  • public class SafeEncode
    extends Object
    • Method Detail

      • safeEncode

        public static String safeEncode​(String s)
                                 throws UnsupportedEncodingException
        Encodes the input string by translating special characters into escape sequences. The resulting string is encoded according to the rules for URL encoding with the exception of the forward slashes and the colon, which are left as-is.
        Parameters:
        s - A UTF-8 string.
        Returns:
        The encoded string.
        Throws:
        UnsupportedEncodingException