mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
6587699: Document DigestInputStream behavior when skip() or mark() / reset() is used
Reviewed-by: wetmore
This commit is contained in:
parent
a1df2da668
commit
54ce11431d
2 changed files with 76 additions and 0 deletions
|
@ -51,6 +51,16 @@ import java.io.InputStream;
|
|||
* retain a handle onto the digest object, and clone it for each
|
||||
* digest to be computed, leaving the original digest untouched.
|
||||
*
|
||||
* @implNote This implementation only updates the message digest
|
||||
* with data actually read from the input stream when it is
|
||||
* {@linkplain #on(boolean) turned on}. This includes the various
|
||||
* {@code read} methods, {@code transferTo}, {@code readAllBytes},
|
||||
* and {@code readNBytes}. Please note that data bypassed by the
|
||||
* {@code skip} method are ignored. On the other hand,
|
||||
* if the underlying stream supports the {@code mark} and
|
||||
* {@code reset} methods, and the same data is read again after
|
||||
* {@code reset}, then the message digest is updated again.
|
||||
*
|
||||
* @see MessageDigest
|
||||
*
|
||||
* @see DigestOutputStream
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue