Class URIEncoder

java.lang.Object
de.uplanet.util.URIEncoder

@Scriptable public final class URIEncoder extends Object
  • Method Details

    • encodeURIComponent

      public static String encodeURIComponent(CharSequence p_chseq)
      Encode an URI component as described in the ECMAScript Language Scecification, 5th edition, section 15.1.3.4.

      The charset used for encoding is UTF-8.

      Parameters:
      p_chseq - The characters to be encoded.
      Returns:
      The encoded characters.
    • encodeURIComponent

      public static String encodeURIComponent(CharSequence p_chseq, String p_strCharset)
      Encode an URI component as described in the ECMAScript Language Specification, 5th edition, section 15.1.3.4.
      Parameters:
      p_chseq - The characters to be encoded.
      p_strCharset - The character set to be used for encoding.
      Returns:
      The encoded characters.
    • encodeURIComponent

      public static String encodeURIComponent(CharSequence p_chseq, Charset p_charset)
      Encode an URI component as described in the ECMAScript Language Specification, 5th edition, section 15.1.3.4.
      Parameters:
      p_chseq - The characters to be encoded.
      p_charset - The character set to be used for encoding.
      Returns:
      The encoded characters.