[ 
https://issues.apache.org/jira/browse/TIKA-3409?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17347750#comment-17347750
 ] 

Nick Burch commented on TIKA-3409:
----------------------------------

I'm not sure if we'd want to put this on MediaTypeRegistry - it doesn't quite 
feel like the right place. We can't easily put it on MediaType itself as you 
need the registry get the aliases and parents.

There's already some media type hierarchy walking code in CompositeParser

Maybe we could add a new util class for working with media types, pull in the 
logic from CompositeParser, and add a "is probably text based" method too. Any 
thoughts [~tallison] [~lfcnassif] (as our main other mime people!)

> provide isBinary/isText method
> ------------------------------
>
>                 Key: TIKA-3409
>                 URL: https://issues.apache.org/jira/browse/TIKA-3409
>             Project: Tika
>          Issue Type: New Feature
>            Reporter: Caleb Cushing
>            Priority: Major
>
> Since tika can detect what kind of file something is, it could also know 
> whether that file type is binary or not, I'd love to have a method  
> `MimeType::isBinary` or something, so I could know if I could try "parsing" 
> the file.
> related https://stackoverflow.com/q/620993/206466



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to