Sebastian Kreft is right in the above discussion in comments.
The code I copied is wrong. it should just be:
String digestString = DigestUtils.md5Hex(bytes);
Sebastian Kreft used the trick to verify empty file's md5 which should always be d41d8cd98f00b204e9800998ecf8427e!