String formatLastModified(String fileName){
synchronized (dateFormat) {
    return dateFormat.format(new Date(FileUtils.lastModified(fileName)));
  }
}

String formatLastModified ( String fileName ) { synchronized ( dateFormat ) { return dateFormat . format ( new Date ( FileUtils . lastModified ( fileName ) ) ) ; } }
get the last modified date of a date and format it as required by the ftp protocol .
