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/11/30 22:55:46 UTC

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

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

 ##########
 File path: src/main/java/org/apache/commons/codec/digest/DigestUtils.java
 ##########
 @@ -1207,6 +1236,43 @@ public static MessageDigest updateDigest(final MessageDigest digest, final File
         }
     }
 
+    /**
+     * Reads through a RandomAccessFile and updates the digest for the data
+     * using non-blocking-io (NIO)
+     *
+     * @param digest 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 MessageDigest updateDigestNio(final MessageDigest digest, final RandomAccessFile data) throws IOException {
 
 Review comment:
   Don't use implementation details in method names, so -1 to the "Nio" postfix.

----------------------------------------------------------------
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