Java – determines if the file is duplicated

Is there a reliable way to determine whether the two files are the same? For example, two files of the same size and type may or may not be the same binary (yes, I know it's not a word) I suppose it would be helpful to compare one or two checksums of files, but I want to know:

>Determine how reliable the checksums of the two checksums are and how different the files are; What is the probability that two different files have the same checksum? > Will reliability increase? Apply additional checksum comparisons? > Which checksum algorithm is the most efficient and / or reliable?

Any ideas, suggestions or ideas are appreciated!

Attachment: this code is written in Java running on Nix system, but general or platform independent input is the most helpful

Solution

1) Very reliable
1) Very reliable
2) Not theoretically
3) SHA-1
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>