public class

ParseUtil

extends Object
java.lang.Object
   ↳ sun.net.www.ParseUtil

Class Overview

A class that contains useful routines common to sun.net.www

Summary

Public Constructors
ParseUtil()
Public Methods
String canonizeString(String file)
Returns a canonical version of the specified string.
static String decode(String s)
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, boolean flag)
static String encodePath(String path)
Constructs an encoded version of the specified path string suitable for use in the construction of a URL.
static URL fileToEncodedURL(File file)
static URI toURI(URL url)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public ParseUtil ()

Public Methods

public String canonizeString (String file)

Returns a canonical version of the specified string.

public static String decode (String s)

Returns a new String constructed from the specified String by replacing the URL escape sequences and UTF8 encoding with the characters they represent.

public static String encodePath (String path, boolean flag)

public static String encodePath (String path)

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.

public static URL fileToEncodedURL (File file)

public static URI toURI (URL url)