Class URIUtil.Coder

  • All Implemented Interfaces:
    Serializable, Cloneable, Comparable
    Enclosing class:
    URIUtil

    protected static class URIUtil.Coder
    extends URI
    Deprecated.
    use org.apache.commons.codec.net.URLCodec
    The basic and internal utility for URI escape and character encoding and decoding.
    See Also:
    Serialized Form
    • Constructor Detail

      • Coder

        protected Coder()
        Deprecated.
    • Method Detail

      • encode

        public static char[] encode​(String unescapedComponent,
                                    BitSet allowed,
                                    String charset)
                             throws URIException
        Deprecated.
        use org.apache.commons.codec.net.URLCodec
        Escape and encode a given string with allowed characters not to be escaped.
        Parameters:
        unescapedComponent - an unescaped component
        allowed - allowed characters not to be escaped
        charset - the charset to encode
        Returns:
        the escaped and encoded string
        Throws:
        URIException - if the charset is not supported
      • decode

        public static String decode​(char[] escapedComponent,
                                    String charset)
                             throws URIException
        Deprecated.
        use org.apache.commons.codec.net.URLCodec
        Unescape and decode a given string.
        Parameters:
        escapedComponent - an being-unescaped component
        charset - the charset to decode
        Returns:
        the escaped and encoded string
        Throws:
        URIException - if the charset is not supported
      • verifyEscaped

        public static boolean verifyEscaped​(char[] original)
        Deprecated.
        Verify whether a given string is escaped or not
        Parameters:
        original - given characters
        Returns:
        true if the given character array is 7 bit ASCII-compatible.
      • replace

        public static String replace​(String original,
                                     char[] from,
                                     char[] to)
        Deprecated.
        Replace from a given character to given character in an array order for a given string.
        Parameters:
        original - a given string
        from - a replacing character array
        to - a replaced character array
        Returns:
        the replaced string
      • replace

        public static String replace​(String original,
                                     char from,
                                     char to)
        Deprecated.
        Replace from a given character to given character for a given string.
        Parameters:
        original - a given string
        from - a replacing character array
        to - a replaced character array
        Returns:
        the replaced string