| Returns a string where all characters that are not valid for a URL
component have been escaped. The escaping of a character is done by
converting it into its UTF-8 encoding and then encoding each of the
resulting bytes as a %xx hexadecimal escape sequence.
The following character sets are not escaped by this method:
- ASCII digits or letters
- ASCII punctuation characters:
- _ . ! ~ * ' ( )
Notice that this method does encode the URL component delimiter
characters:
; / ? : & = + $ , #
Parameters: decodedURLComponent - a string containing invalid URL characters a string with all invalid URL characters escaped throws: NullPointerException - if decodedURLComponent is null |