Does Tika library provide an efficient binary file check?

For a source code search engine I'd like to provide support for indexing
all text files (including non-source-code text files) and exclude files
that are binary.
Files are read over NFS, therefore a binary check with minimum file content
read would be preferable if possible at all.

Thank you,