if (digestPool.size() == 0) {
// if there are no digest objects left, create some on the fly
// this is not the most effective way but if we wouldn't do that the encoder would block
try {
digest = MessageDigest.getInstance("MD5");
digest.reset();
fromPool = false;
} catch (final NoSuchAlgorithmException e) {
}
}
if (digest == null) try {