net.sourceforge.taverna.io
Class FileNameUtil

java.lang.Object
  extended by net.sourceforge.taverna.io.FileNameUtil

public class FileNameUtil
extends java.lang.Object

This class contains utilities used with managing files. Last edited by $Author: sowen70 $

Version:
$Revision: 1.2 $
Author:
Mark

Constructor Summary
FileNameUtil()
           
 
Method Summary
static java.lang.String getExtension(java.lang.String filename)
          This method returns the extension of the file.
static java.lang.String getExtensionFromPath(java.lang.String path)
          This method gets the extension given fully qualified path/to/file.ext
static java.lang.String replaceExtension(java.lang.String filename, java.lang.String newExt)
          This method replaces the extension of the current file.
static java.lang.String replacePathExtension(java.lang.String path, java.lang.String newExt)
          This method replaces the extension of a file given a complete path for the file.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileNameUtil

public FileNameUtil()
Method Detail

getExtension

public static java.lang.String getExtension(java.lang.String filename)
This method returns the extension of the file.

Parameters:
filename - The name of the file.
Returns:

getExtensionFromPath

public static java.lang.String getExtensionFromPath(java.lang.String path)
This method gets the extension given fully qualified path/to/file.ext

Parameters:
path - The complete path to the file.
Returns:

replaceExtension

public static java.lang.String replaceExtension(java.lang.String filename,
                                                java.lang.String newExt)
This method replaces the extension of the current file.

Parameters:
filename - The name of the file.
newExt - The new extension for the file
Returns:

replacePathExtension

public static java.lang.String replacePathExtension(java.lang.String path,
                                                    java.lang.String newExt)
This method replaces the extension of a file given a complete path for the file.

Parameters:
path - The complete path to the file.
newExt - The new extension for the file.
Returns: