question: public static boolean textFile ( File f , boolean emptyOk ) { if ( f . length ( ) == 0 ) return emptyOk ; String detected = VisorMimeTypes . getContentType ( f ) ; for ( String mime : TEXT_MIME_TYPE ) if ( mime . equals ( detected ) ) return true ; return false ; }
target:  Check is text file.