aicas logo Jamaica 3.4 release 8

com.sun.jndi.toolkit.url
Class UrlUtil

java.lang.Object
  extended by com.sun.jndi.toolkit.url.UrlUtil

public final class UrlUtil
extends Object

Utilities for dealing with URLs.


Method Summary
static String decode(String s)
          Decode a URI string (according to RFC 2396).
static String decode(String s, String enc)
          Decode a URI string (according to RFC 2396).
static String encode(String s, String enc)
          Encode a string for inclusion in a URI (according to RFC 2396).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

decode

public static final String decode(String s)
                           throws MalformedURLException
Decode a URI string (according to RFC 2396).

Throws:
MalformedURLException

decode

public static final String decode(String s,
                                  String enc)
                           throws MalformedURLException,
                                  UnsupportedEncodingException
Decode a URI string (according to RFC 2396). Three-character sequences '%xy', where 'xy' is the two-digit hexadecimal representation of the lower 8-bits of a character, are decoded into the character itself. The string is subsequently converted using the specified encoding

Throws:
MalformedURLException
UnsupportedEncodingException

encode

public static final String encode(String s,
                                  String enc)
                           throws UnsupportedEncodingException
Encode a string for inclusion in a URI (according to RFC 2396). Unsafe characters are escaped by encoding them in three-character sequences '%xy', where 'xy' is the two-digit hexadecimal representation of the lower 8-bits of the character. The question mark '?' character is also escaped, as required by RFC 2255. The string is first converted to the specified encoding. For LDAP (2255), the encoding must be UTF-8.

Throws:
UnsupportedEncodingException

aicas logo Jamaica 3.4 release 8

aicas GmbH, Karlsruhe - Germany    www.aicas.com
Copyright 2001-2009 aicas GmbH. All Rights Reserved.