Package com.sun.ts.lib.util.sec.net.www
Class ParseUtil
java.lang.Object
com.sun.ts.lib.util.sec.net.www.ParseUtil
A class that contains useful routines common to sun.net.www
- Author:
- Mike McCloskey
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncanonizeString
(String file) Returns a canonical version of the specified string.static String
Returns a new String constructed from the specified String by replacing the URL escape sequences and UTF8 encoding with the characters they represent.static String
encodePath
(String path) Constructs an encoded version of the specified path string suitable for use in the construction of a URL.static String
encodePath
(String path, boolean flag) static URL
fileToEncodedURL
(File file) static URI
-
Constructor Details
-
ParseUtil
public ParseUtil()
-
-
Method Details
-
encodePath
Constructs an encoded version of the specified path string suitable for use in the construction of a URL. A path separator is replaced by a forward slash. The string is UTF8 encoded. The % escape sequence is used for characters that are above 0x7F or those defined in RFC2396 as reserved or excluded in the path component of a URL. -
encodePath
-
decode
Returns a new String constructed from the specified String by replacing the URL escape sequences and UTF8 encoding with the characters they represent. -
canonizeString
Returns a canonical version of the specified string. -
fileToEncodedURL
- Throws:
MalformedURLException
-
toURI
-