You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2019/12/01 02:04:45 UTC

[GitHub] [commons-codec] behrangsa commented on a change in pull request #31: Added non-blocking File digest methods

behrangsa commented on a change in pull request #31: Added non-blocking File digest methods
URL: https://github.com/apache/commons-codec/pull/31#discussion_r352314823
 
 

 ##########
 File path: src/main/java/org/apache/commons/codec/digest/DigestUtils.java
 ##########
 @@ -99,6 +101,33 @@
         return updateDigest(messageDigest, data).digest();
     }
 
+    /**
+     * Reads through a File using non-blocking-io (NIO) and returns the digest for the data
+     *
+     * @param messageDigest The MessageDigest to use (e.g. MD5)
+     * @param data          Data to digest
+     * @return the digest
+     * @throws IOException On error reading from the stream
+     * @since 1.14
+     */
+    public static byte[] nonblockingDigest(final MessageDigest messageDigest, final File data) throws IOException {
 
 Review comment:
   If I remove the prefix from:
   
   ```java
   nonblockingDigest(final MessageDigest messageDigest, final File data)
   ```
   
   will clash with an existing method name.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services