Class LoaderUtils


  • public class LoaderUtils
    extends java.lang.Object
    Creation-Date: 05.04.2006, 16:02:53
    Author:
    Thomas Morgner
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getFileName​(java.lang.String file)
      Extracts the file name from a path name.
      static java.lang.String mergePaths​(java.lang.String parent, java.lang.String child)
      Merges two paths.
      static java.lang.String stripLeadingSlashes​(java.lang.String s)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • stripLeadingSlashes

        public static java.lang.String stripLeadingSlashes​(java.lang.String s)
      • mergePaths

        public static java.lang.String mergePaths​(java.lang.String parent,
                                                  java.lang.String child)
                                           throws ResourceKeyCreationException
        Merges two paths. A path is recognized as an absolute path, if it has an URL-schema definition attached. A parent is recognized as container path (a directory, in the common language), if it ends with a slash. Todo: Introduce escaping using "\" as escape char.
        Parameters:
        parent -
        child -
        Returns:
        Throws:
        ResourceKeyCreationException
      • getFileName

        public static java.lang.String getFileName​(java.lang.String file)
        Extracts the file name from a path name.
        Parameters:
        file - the path name.
        Returns:
        the extracted filename.