public static String removeExtension(String path) throws IllegalArgumentException
  {
    Params.notNull(path, "Path");
    int extensionIndex = path.lastIndexOf('.');
    return extensionIndex != -1 ? path.substring(0, extensionIndex) : path;
  }
public static String removeExtension ( String path ) throws IllegalArgumentException { Params . notNull ( path , "Path" ) ; int extensionIndex = path . lastIndexOf ( '.' ) ; return extensionIndex != - 1 ? path . substring ( 0 , extensionIndex ) : path ; }
Remove extension from given file path and return resulting path.

@param path file path to remove extension from.
@return newly created path without extension.
@throws IllegalArgumentException if <code>path</code> parameter is null.