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
Have a look at mime-utils. It works with content and/or with extensions.