spring - How to get the md5sum of a file in Java? -


i have file need reload in application everytime changes.

i'm checking lastmodified , i'd check md5sum before process it.

i'm using spring framework, in case there useful in there.

what's best way check this? examples/libraries should check?

thanks.

the explanation , code snippet in link might you

just record , there common issue in of snippets use biginteger , biginteger class removes zeros @ start of string might want add check

    string res =new biginteger(1,m.digest()).tostring(16);     if (res.length() == 31)           res = "0" + res; 

Comments