This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Java in General and the fly likes Comparing two Files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Comparing two Files" Watch "Comparing two Files" New topic
Author

Comparing two Files

martin chile
Greenhorn

Joined: Jun 24, 2002
Posts: 21
I want to compare two Files, one of them might be different(just a changed character or a whole paragraph more).
Comparing the length or the last modified date is not working when there are small differences.
Is there a fast way to read the checksum or something like that, so that i don't have to open the documents to look by my own.
Thanks for helping me!
Martin
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 9154
    
    9

Read the files in using different instances of java.util.zip.CheckedInputStream, then compare their checksums.


[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Comparing two Files
 
jQuery in Action, 3rd edition