Is there a java library equivalent to `file` command in unix
- by Shervin
Is there any java libraries that is similar to unix's command file?
ie:
$ file somepicture.png
somepicture.png PNG image, 805 x 292, 8-bit/color RGB, non-interlaced
The file command is such a nice tool. I need something that can tell me if the file is really what I want it to be. (ie a picture, document etc)
I know I can run the command file, but I am looking for a java library, not running the actual unix command.