FormatTools is a project mainly written in ..., it's free.
JAVA Interface to provide format identification, validation and characterization tools