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;
}

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 ; }
check is text file .
