org.mmbase.util
Class UriParser

java.lang.Object
  extended by 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
           
 
Constructor Summary
UriParser()
           
 
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
 

Field Detail

SEPARATOR

static final char SEPARATOR
Constructor Detail

UriParser

public UriParser()
Method Detail

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