I'm getting the Md5 of a file using Apache DigestUtils as follows:
public static String getMd5(File file) throws Exception
{
FileInputStream fis = null;
String md5 = "";
fis = new FileInputStream(file);
md5 = DigestUtils.md5Hex(fis)
IOUtils.closeQuietly(fis);
return md5;
}
This Md5 is being used as a key. I am doing a check for uniqueness (because of possible collisions), however, if it is not unique, how do I make it unique?
Thanks in advance!