java - What is an Encoded URI string? -


here in docs of uri description of parse() says

creates uri parses given encoded uri string.

what encoded uri string? this:

http://username:password@host:8080/directory/file?query#fragment 

or this?

http%3a%2f%2fusername%3apassword%40host%3a8080%2fdirectory%2ffile%3fquery%23fragment 

http%3a%2f%2fusername%3apassword%40host%3a8080%2fdirectory%2ffile%3fquery%23fragment  

for example can use code encoding.

str = urlencoder.encode(str, "utf-8").replaceall("\\+", "%20")                 .replaceall("\\%21", "!").replaceall("\\%27", "'")                 .replaceall("\\%28", "(").replaceall("\\%29", ")")                 .replaceall("\\%7e", "~") 

Comments