[Codec?] calculate a fingerprint while reading InputStream ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Codec?] calculate a fingerprint while reading InputStream ?

Haryon
Is there a way (in Jakarta Commons) to perform a Hash (MD5 or
whatever) while reading an InputStream ?

I would like to get a hash of some 20Mo files, and I would not like to
md5(byte[]) :)

I have seen some MD5InputStream classes out there, but mostly in
unknown (for me) packages. I wish I could use jakarta tools, since I'm
using quite of them already.

tia.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [Codec?] calculate a fingerprint while reading InputStream ?

Ronald Klop-2
On Wed, 15 Jun 2005 21:14:37 +0200, Haryon <[hidden email]> wrote:

> Is there a way (in Jakarta Commons) to perform a Hash (MD5 or
> whatever) while reading an InputStream ?
>
> I would like to get a hash of some 20Mo files, and I would not like to
> md5(byte[]) :)
>
> I have seen some MD5InputStream classes out there, but mostly in
> unknown (for me) packages. I wish I could use jakarta tools, since I'm
> using quite of them already.

See java.security.DigestInputStream.

Ronald.

--
  Ronald Klop
  Amsterdam, The Netherlands

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]