code: public static boolean hasFinishedCopying(File file) {
  
  		FileInputStream fis = null;
  		FileLock lock = null;
  		try {
  			fis = new FileInputStream(file);
  			FileChannel fc = fis.getChannel();
  			lock = fc.tryLock(0L, Long.MAX_VALUE, true);
  		} catch (IOException ioe) {
  			return false;
  		} finally {
  			IOUtils.close(fis);
  		}
  		return lock != null;
  	}
docs: Returns true if a file is available for read. (Write operation finished)
  
  @param file
  the file
  @return true if a file is available for read.