java.lang.Object
java.io.InputStream
java.io.FilterInputStream
com.aoapps.hodgepodge.md5.MD5InputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
MD5InputStream is a subclass of FilterInputStream adding MD5
hashing of the read input.
- Version:
- $Revision: 1.2 $
- Author:
- Santeri Paavolainen <santtu@cs.hut.fi>
-
Field Summary
Fields inherited from class java.io.FilterInputStream
in
-
Constructor Summary
-
Method Summary
Methods inherited from class java.io.FilterInputStream
available, close, mark, markSupported, read, reset, skip
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
Constructor Details
-
MD5InputStream
Creates a MD5InputStream.- Parameters:
in
- The input stream
-
-
Method Details
-
read
Read a byte of data.- Overrides:
read
in classFilterInputStream
- Throws:
IOException
- See Also:
-
read
Reads into an array of bytes.- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
hash
public byte[] hash()Returns array of bytes representing hash of the stream as finalized for the current state.- See Also:
-