Package org.aktin.broker.db
Class DigestCalculatingInputStream
java.lang.Object
java.io.InputStream
org.aktin.broker.db.DigestCalculatingInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable
public class DigestCalculatingInputStream extends InputStream
-
Constructor Summary
Constructors Constructor Description DigestCalculatingInputStream(InputStream source, String[] algorithms) -
Method Summary
Modifier and Type Method Description intavailable()voidclose()byte[][]getDigests()booleanmarkSupported()intread()intread(byte[] dest)intread(byte[] dest, int off, int len)longskip(long arg0)Methods inherited from class java.io.InputStream
mark, nullInputStream, readAllBytes, readNBytes, readNBytes, reset, transferTo
-
Constructor Details
-
DigestCalculatingInputStream
public DigestCalculatingInputStream(InputStream source, String[] algorithms) throws NoSuchAlgorithmException- Throws:
NoSuchAlgorithmException
-
-
Method Details
-
getDigests
public byte[][] getDigests() -
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
markSupported
public boolean markSupported()- Overrides:
markSupportedin classInputStream
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
skip
- Overrides:
skipin classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-