I am watching a directory for incoming files (using FileAlterationObserver from apache commons).
class Example implements FileAlterationListener { public
You can check the size of the file 2 or more times in a couple of seconds and if the size is not changing, then you can decide the file change has completed and proceed with your own execution.