code: public static boolean renameFile(final File fileToRename,
  		final String newFileNameWithoutAbsolutPath)
  		throws IOException, FileIsADirectoryException, FileDoesNotExistException
  	{
  		if (!fileToRename.exists())
  		{
  			throw new FileDoesNotExistException(
  				"File" + fileToRename.getName() + " does not exists!");
  		}
  		final String fileNameAbsolutPathPrefix = FileExtensions
  			.getAbsolutPathWithoutFilename(fileToRename);
  		final StringBuffer sb = new StringBuffer();
  		sb.append(fileNameAbsolutPathPrefix);
  		sb.append(newFileNameWithoutAbsolutPath);
  		final File newNameForFile = new File(sb.toString());
  		final boolean sucess = renameFile(fileToRename, newNameForFile);
  		return sucess;
  	}
docs: This method renames a given file. For instance if we have a file which we want to rename with
  the path "/tmp/test.dat" to "/tmp/renamed.dat" then you call the method as follow:
  renameFile(new File("C://tmp//test.dat"), new File("C://tmp//renamed.dat"));
  
  @param fileToRename
  The file to rename.
  @param newFileNameWithoutAbsolutPath
  The new name from the file.
  @return 's true if the file was renamed otherwise false.
  @throws IOException
  Signals that an I/O exception has occurred.
  @throws FileIsADirectoryException
  the file is A directory exception
  @throws FileDoesNotExistException
  the file does not exist exception