Is there any java library that is similar to unix\'s command file?
file
ie:
$ file somepicture.png somepicture.png PNG image, 805 x 292, 8-b
I am not sure it is exactly what you are looking for, but the following link can maybe help you :
http://www.rgagnon.com/javadetails/java-0487.html