I am working on an app that download files from an sftp server...comparing things in a server and on a local machine got a bit too much for me! So i have decided to download the txt. files to a temp folder. What i am trying to do is compare the data newly downloaded txt file with the one in the local machine. So that if the contens of the files are the same i can do X if not Y. Any help! Ive tried hashCode() from java.io.File and lastModified() but those function calls refer to pathfilename and that is why i dont think the comparision is working for me.