| java.lang.Object org.enhydra.servlet.servlets.Path
Path | class Path (Code) | | Utility class to help manipulate paths. Method cleans up multiple
'/' or '\' when constructing the object and prevents adding additional
'/' or '\' when appending paths. For the purposes of this class a
'UrlPath' is a path with the path separators character of '/',
regardless of platform; A 'FilePath' is a path with system dependent
path separators characters (UNIX - '/' DOS - '\').
version: $Revision: 1.2 $ author: Mark Sanguinetti |
Constructor Summary | |
| Path(String p) Constructs a Path Object based on String p. | | Path(String p1, String p2) Constructs a Path Object as by appending p2 to the end
of p1. |
Method Summary | |
public String | appendFilePath(String p) Appends a path to the end of this object, and returns a
string representing the new File path without changing the
this object.
Parameters: p - The path to append to the end of this object. | public String | appendUrlPath(String p) Appends a path to the end of this object, and returns a
string representing the new Url path without changing the
this object.
Parameters: p - The path to append to the end of this object. | public String | getFilePath() Converts the Path object to 'FilePath' format. | public String | getUrlPath() Converts the Path object to 'UrlPath' format. |
Path | Path(String p)(Code) | | Constructs a Path Object based on String p.
Parameters: p - used to form the path. |
Path | Path(String p1, String p2)(Code) | | Constructs a Path Object as by appending p2 to the end
of p1.
Parameters: p1 - the first part of the path. Parameters: p2 - the second part of the path. |
appendFilePath | public String appendFilePath(String p)(Code) | | Appends a path to the end of this object, and returns a
string representing the new File path without changing the
this object.
Parameters: p - The path to append to the end of this object. The new File path. |
appendUrlPath | public String appendUrlPath(String p)(Code) | | Appends a path to the end of this object, and returns a
string representing the new Url path without changing the
this object.
Parameters: p - The path to append to the end of this object. The new Url path. |
getFilePath | public String getFilePath()(Code) | | Converts the Path object to 'FilePath' format. A 'FilePath'
is a path with system dependent path separators characters
(UNIX - '/' DOS - '\').
Path in FilePath format. |
getUrlPath | public String getUrlPath()(Code) | | Converts the Path object to 'UrlPath' format. 'UrlPath' is
a path with the path separators character of '/', regardless
of platform.
Path in URL format. |
|
|