InputStream is = null; try { is = openFileForReading(file); return detectMimeType(is); } catch (IOException e) { return null; } catch (SVNException e) { return null; } finally { closeFile(is);
if (read > 0 && binaryCount * 1000 / read > 850) { return BINARY_MIME_TYPE;
    public static String detectMimeType(File file) {        if (file == null || !file.exists()) {            return null;        }        InputStream is = null;        try {            is = openFileForReading(file);            return detectMimeType(is);        } catch (IOException e) {            return null;        } catch (SVNException e) {            return null;        } finally {            closeFile(is);        }    }