com.ibm.commons.util
Class PathUtil

java.lang.Object
  extended by com.ibm.commons.util.PathUtil

public final class PathUtil
extends java.lang.Object

Some utilities for path handling.


Constructor Summary
PathUtil()
           
 
Method Summary
static java.lang.String concatParts(java.lang.String path1, java.lang.String path2, char sep)
          Add to path ensuring that the resulting path doesn't start with a '/' and doesn't end with a '/'.
static java.lang.String concatPath(java.lang.String path1, java.lang.String path2, char sep)
          Add to path ensuring that the resulting path will start with a '/' and doesn't end with a '/'.
static java.lang.String normalizePath(java.lang.String path, char sep)
          Normalize a path, ensuring that it start with a '/' and does not end with a '/'.
static java.lang.String surroundPath(java.lang.String path, char sep)
          Surrounds a path, ensuring that it starts with a '/' and ends with a '/'.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathUtil

public PathUtil()
Method Detail

concatPath

public static java.lang.String concatPath(java.lang.String path1,
                                          java.lang.String path2,
                                          char sep)
Add to path ensuring that the resulting path will start with a '/' and doesn't end with a '/'.


concatParts

public static java.lang.String concatParts(java.lang.String path1,
                                           java.lang.String path2,
                                           char sep)
Add to path ensuring that the resulting path doesn't start with a '/' and doesn't end with a '/'.


normalizePath

public static java.lang.String normalizePath(java.lang.String path,
                                             char sep)
Normalize a path, ensuring that it start with a '/' and does not end with a '/'.


surroundPath

public static java.lang.String surroundPath(java.lang.String path,
                                            char sep)
Surrounds a path, ensuring that it starts with a '/' and ends with a '/'.