See https://stackoverflow.com/questions/22818590/java-how-to-check-that-2-binary-files-are-same .
As this thread nicely points out, depending on the expected usage pattern of your logic, you might consider storing an md5 hash, and compare hashes as this would save you from having to retrieve the stored file form disk.