Hi everyone.

I'm going to read a content of a jpg file using java.io.FileReader. I'm successfully read the whole content of it. But the problem is, I want to only read the last 32 digit hexadecimal number which is MD5 hash I save earlier. How am i suppose to do?

Recommended Answers

All 2 Replies

How about uisng skip(<length of file> - 32) then reading 32 bytes?
ps for reading binary data you should consider FileInputStream rather than FileReader, which is optimised for characters in some defuakt character encoding.

commented: simple but great! +1

Thanks James!
It works for me!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.