org.mmbase.util
Class UriParser
java.lang.Object
org.mmbase.util.UriParser
public class UriParser
- extends Object
For an important part stolen from jakarta vfs (only one function).
- Since:
- MMBase-1.7
- Version:
- $Id: UriParser.java 41055 2010-02-15 23:59:16Z michiel $
- Author:
- Michiel Meeuwissen
- Javadoc:
|
Field Summary |
(package private) static char |
SEPARATOR
|
|
Method Summary |
static String |
makeRelative(String basePath,
String path)
Converts an absolute path into a relative path, being a path relative to basePath. |
static String |
makeRelative(String basePath,
String path,
char separatorChar)
Converts an absolute path into a relative path, being a path relative to basePath. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SEPARATOR
static final char SEPARATOR
UriParser
public UriParser()
makeRelative
public static String makeRelative(String basePath,
String path)
- Converts an absolute path into a relative path, being a path relative to basePath.
Uses the fileseparator of the current filesystem.
- Parameters:
basePath - The base path.path - The path to convert against basePath.
makeRelative
public static String makeRelative(String basePath,
String path,
char separatorChar)
- Converts an absolute path into a relative path, being a path relative to basePath.
- Parameters:
basePath - The base path.path - The path to convert against basePath.separatorChar - Path separator ('\' for windows '/' for others)
MMBase 2.0-SNAPSHOT - null