private static MassSpecFileFormat detectFormat(String content) {
        MassSpecFileFormat format = null;

        if (MassSpecFileRegx.PRIDE_XML_PATTERN.matcher(content).find()) {
            format = PRIDE;
        } else if (MassSpecFileRegx.MZML_PATTERN.matcher(content).find()) {
            format = MZML;
        } else if (MassSpecFileRegx.MZIDENTML_PATTERN.matcher(content).find()) {
            format = MZIDENTML;
        } else if (MassSpecFileRegx.MZXML_PATTERN.matcher(content).find()) {
            format = MZXML;
        } else if (MassSpecFileRegx.MZDATA_PATTERN.matcher(content).find()) {
            format = MZDATA;
        }

        return format;
    }