Files: extensions and MIME[ MIME: Multipurpose Internet Mail Extensions] type
Object Oriented Programming & Java project
Goals
The POO - Java module project makes it possible to implement the main elements of the content of the module as part of the design of a small application. The work is to be done in pairs (exceptionally alone, for special situations[ Case of students in Terminal control, AJAC or odd number of students on the whole promotion by example]).
Context of the project
A common belief is that the extension of a file determines its type: as long as the effective type of a file and its extension are consistent, this statement is true, for against as soon as the extension is no longer consistent with the content, it is necessary to rely on the MIME type to evaluate a file (this is generally the case for content exchanges multimedia via mail or the way files are processed by browsers when visit a web page). Under Linux, the command "file" in command line allows to know the MIME type of a file.
The objective of the project is to create a small application allowing to detect anomalies on data files[ We will not consider the analysis of programs (of type .exe, .jar, .class, etc.).] of the user, so either to check a specific file (detection of empty files, detection of inconsistency between extension and MIME type, in-depth analysis of content of a file), or to explore and analyze a set of files from a folder.
++
The main actions of your software are:
checking a machine file (based on the extension and MIME type of the file)
the complete exploration (a folder and all of its sub-folders) of a directory with verification of each file.
The validation of the extension and of the MIME type on the basis of a list of signatures to create (example: a file with extension ".html" and MIME type "text / html" should to start[ After possibly comments of type “<! -… ->”] with "<! DOCTYPE html>"; a script file with extension ".sh" and type MIME "application / x-shellscript" or "application / x-shell" should start[ After possibl