Team LiB
Previous Section Next Section

URLEncoderjava.net

Java 1.0

This class defines a single static method that converts a string to its URL-encoded form. That is, spaces are converted to +, and nonalphanumeric characters other than underscore are output as two hexadecimal digits following a percent sign. Note that this technique works only for 8-bit characters. This method canonicalizes a URL specification so that it uses only characters from an extremely portable subset of ASCII that can be correctly handled by computers around the world.

public class URLEncoder {
// No Constructor
// Public Class Methods
1.4  public static String encode(String s, String enc) 
throws java.io.UnsupportedEncodingException;  
// Deprecated Public Methods
#    public static String encode(String s);  
}

    Team LiB
    Previous Section Next Section