Class StreamWithMD5Decorator
- java.lang.Object
-
- java.io.InputStream
-
- technology.dice.dicewhere.downloader.stream.StreamWithMD5Decorator
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class StreamWithMD5Decorator extends InputStream
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()MD5Checksummd5()static StreamWithMD5Decoratorof(InputStream inputStream)intread()intread(byte[] b, int off, int len)-
Methods inherited from class java.io.InputStream
available, mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Method Detail
-
of
public static StreamWithMD5Decorator of(InputStream inputStream) throws NoSuchAlgorithmException
- Throws:
NoSuchAlgorithmException
-
md5
public MD5Checksum md5()
-
read
public int read() throws IOException- Specified by:
readin classInputStream- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
-