How to detect file type from content in Java
This tutorial shows how to detect file type from content in Java using Apache Tika. File format detection is a usually required in search engines where crawled resources are required to be analysed, classified, tagged and indexed. We will use Apache’s Tika here to do the job.