I have two word documents which i am trying to compare in java . I tried using
md5 hashcode
HashCode newFile = Files.asByteSource(newFileInput).hash(Hashing.md5());
HashCode oldFile = Files.asByteSource(oldFileInput).hash(Hashing.md5());
and also using,
boolean isEqual = FileUtils.contentEquals(oldFile , newFile);
Even though the contents are same ,compared the content using online tools and beyond compare, still the hashcode in both above method comes as MISMATCH.
any solutions? or way to compare any file type using any API in Java. i need to do deep compare between two word files as in for spaces,fonts , content. etc..
Expected Result : Both file should match