All About Class URLEncode in Java

URLEncode class contains an utility method for converting a String into a MIME format called "x-www-form-urlencoded" format.To convert a String,each character is examined in turn for the following cases..

  • The ASCII characters 'a' through 'z' ,'A' through 'Z' and '0' through '9' remain the same.
  • The space character ' ' is converted into a plus sign(+).
  • All other characters are converted into three character String "%xy" where xy is the two digit hexadecimal representation of the lower 16 bit of the character.
The structure of the URLEncode class is given as:

public class java.net.URLEncode extends java.lang.Object{
//Methods:
public static String encode(String str);
//translate a String str into x-www-form-urlencoded format
}
 
All About Class URLEncode in Java All About Class URLEncode in Java Reviewed by Animesh Chatterjee on September 24, 2018 Rating: 5

No comments:

Powered by Blogger.