public static boolean renameFile(String filePath,String oldFilename,String newFilename){
  if ((filePath == null) || filePath.isEmpty() || (oldFilename == null)|| oldFilename.isEmpty()|| (newFilename == null)|| newFilename.isEmpty()) {
    return false;
  }
  File oldFile=new File(filePath + File.separator + oldFilename);
  File newFile=new File(filePath + File.separator + newFilename);
  boolean isSuccessfulRename;
  try {
    isSuccessfulRename=oldFile.renameTo(newFile);
  }
 catch (  Exception e) {
    logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    isSuccessfulRename=false;
  }
  return isSuccessfulRename;
}

public static boolean renameFile ( String filePath , String oldFilename , String newFilename ) { if ( ( filePath == null ) || filePath . isEmpty ( ) || ( oldFilename == null ) || oldFilename . isEmpty ( ) || ( newFilename == null ) || newFilename . isEmpty ( ) ) { return false ; } File oldFile = new File ( filePath + File . separator + oldFilename ) ; File newFile = new File ( filePath + File . separator + newFilename ) ; boolean isSuccessfulRename ; try { isSuccessfulRename = oldFile . renameTo ( newFile ) ; } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; isSuccessfulRename = false ; } return isSuccessfulRename ; }
this is a quiet method .
