public class DigestInputStream extends FilterInputStream
| Modifier and Type | Field and Description |
|---|---|
protected Digest |
digest |
in| Constructor and Description |
|---|
DigestInputStream(InputStream stream,
Digest digest) |
| Modifier and Type | Method and Description |
|---|---|
Digest |
getDigest() |
int |
read()
Reads a single byte from the filtered stream and returns it as an integer
in the range from 0 to 255.
|
int |
read(byte[] b,
int off,
int len)
Reads up to
byteCount bytes from this stream and stores them in
the byte array buffer starting at byteOffset. |
available, close, mark, markSupported, reset, skipnullInputStream, read, readAllBytes, readNBytes, readNBytes, transferToprotected Digest digest
public DigestInputStream(InputStream stream, Digest digest)
public int read()
throws IOException
FilterInputStreamread in class FilterInputStreamIOException - if the stream is closed or another IOException occurs.public int read(byte[] b,
int off,
int len)
throws IOException
InputStreambyteCount bytes from this stream and stores them in
the byte array buffer starting at byteOffset.
Returns the number of bytes actually read or -1 if the end of the stream
has been reached.read in class FilterInputStreamIOException - if the stream is closed or another IOException occurs.public Digest getDigest()