Skip to content

Commit

Permalink
[CODEC-272] Add RandomAccessFile digest methods #31.
Browse files Browse the repository at this point in the history
- This is a slightly different version from
#31
- Refactor updateDigest(MessageDigest,RandomAccessFile) into an new
private updateDigest(MessageDigest,FileChannel) as possible public
candidate.
- Do NOT seek to 0 on a RandomAccessFile before calling updateDigest():
We do not do this for ByteBuffer input, so do not do it here and be
consistent to assume that when the caller says 'digest this' then do it
from where the input stands (like a stream).
- Add methods in the file to keep methods in alphabetical order.
- Closes #31.
  • Loading branch information
Gary Gregory committed Dec 4, 2019
1 parent 625cedf commit a3a4edd
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -167,7 +167,7 @@ public void testNonBlockingDigestRandomAccessFile() throws IOException {
DigestUtils.getDigest(messageDigestAlgorithm), getTestRandomAccessFile()
)
);

getTestRandomAccessFile().seek(0);
Assert.assertArrayEquals(expected,
DigestUtils.digest(
DigestUtils.getDigest(messageDigestAlgorithm), getTestRandomAccessFile()
Expand Down

0 comments on commit a3a4edd

Please sign in to comment.