> Hi
> I want to compare two big files (like films), so I create a fingerprint
[quoted text clipped - 3 lines]
> I think the array data in readFile(String filename) function is too
> big...so how do I do?
Take a look at MessageDigest.update() and friends. These methods are
explicitly meant to deal with chunks of data, instead of the whole file.
You can just fill up a fixed-size array until the file has been traversed,
adding one "block" at a time to the digest.

Signature
You can't run away forever,
But there's nothing wrong with getting a good head start.
--- Jim Steinman, "Rock and Roll Dreams Come Through"
Roedy Green - 01 Dec 2005 03:33 GMT
>Take a look at MessageDigest.update() and friends. These methods are
>explicitly meant to deal with chunks of data, instead of the whole file.
>You can just fill up a fixed-size array until the file has been traversed,
>adding one "block" at a time to the digest.
see http://mindprod.com/jgloss/digest.html
for what you are doing an size/date/adlerian checksum might suffice.
It is much faster to compute.
See http://mindprod.com/jgloss/adler.html

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.