Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to check if a file represents an image file

807580Jan 19 2010 — edited Jan 26 2010
How to check if a file represents an image file, I need this to validate if a file is an image file?
I am cheking the file extn using regular expression but it doesn't seems sufficient as if I change an image abc.png to abc.xyz,
still i can display the image on the button. Any suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 23 2010
Added on Jan 19 2010
7 comments
998 views