Class Decoder


  • public class Decoder
    extends Object
    Decodes a Java String containing a percent-encoded UTF-8 String value into a Java String (in its internal UTF-16 encoding).
    • Constructor Detail

      • Decoder

        public Decoder()
    • Method Detail

      • decode

        public static String decode​(String value)
                             throws IllegalArgumentException,
                                    NumberFormatException
        Decodes a percent-encoded UTF-8 String value into a Java String (in its internal UTF-16 encoding).
        Parameters:
        value - the encoded String
        Returns:
        the Java String
        Throws:
        IllegalArgumentException - if value contains characters not representing UTF-8 bytes or ends with an unfinished percent-encoded character
        NumberFormatException - if the two characters after a percent character are not hexadecimal digits