All About Class URLEncode in Java

0
34
Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

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
}
 
Don't miss out!
Subscribe To Newsletter

Receive top technical news, lesson ideas, travel tips and more!

Invalid email address
Give it a try. You can unsubscribe at any time.

Spread the love
  • 1
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
    1
    Share

LEAVE A REPLY

Please enter your comment!
Please enter your name here