How with apache tika can I detect if file is mp3? I am not looking for just file extension based detection.
I am using:
typeTika = new Tika(new TypeDetector());
but when I try detect a type answer is always:
application/octet stream
(whatever I send: mp3, image etc it's always application/octet stream)
What can I do to determine if file is mp3 or not?
This question is not a duplicate. Here someone use Tika with file extension detection. This is not enough for me. I need to know if file is mp3 or not based on file type and not on a file name. I can't find any info in documentation how to do this.
TypeDetector always return application/octet stream for all files types so I want to know how to use it to get info if file is mp3 or not.