public final class HashingInputStream extends FilterInputStream
in| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
static MessageDigest |
createDigest(String algorithm) |
byte[] |
getDigest() |
String |
getHashAsString() |
void |
mark(int readlimit) |
boolean |
markSupported() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
static HashingInputStream |
sha1(InputStream in) |
skippublic static final MessageDigest createDigest(String algorithm) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static HashingInputStream sha1(InputStream in) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterInputStreamIOExceptionpublic byte[] getDigest()
public int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic boolean markSupported()
markSupported in class FilterInputStreampublic void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic String getHashAsString() throws IOException
IOExceptionCopyright © 2015. All Rights Reserved.