package net.gotev.uploadservice;

import android.webkit.MimeTypeMap;
/* loaded from: classes.dex */
public final class ContentType {
    private static final String APPLICATION = "application/";
    public static final String APPLICATION_BCPIO = "application/x-bcpio";
    public static final String APPLICATION_CDF = "application/x-cdf";
    public static final String APPLICATION_CPIO = "application/x-cpio";
    public static final String APPLICATION_CSH = "application/x-csh";
    public static final String APPLICATION_DIRECTOR = "application/x-director";
    public static final String APPLICATION_DVI = "application/x-dvi";
    public static final String APPLICATION_ENVOY = "application/envoy";
    public static final String APPLICATION_FRACTALS = "application/fractals";
    public static final String APPLICATION_FUTURESPLASH = "application/futuresplash";
    public static final String APPLICATION_GTAR = "application/x-gtar";
    public static final String APPLICATION_GZIP = "application/x-gzip";
    public static final String APPLICATION_HDF = "application/x-hdf";
    public static final String APPLICATION_HTA = "application/hta";
    public static final String APPLICATION_INTERNET_PROPERTY_STREAM = "application/internet-property-stream";
    public static final String APPLICATION_INTERNET_SIGNUP = "application/x-internet-signup";
    public static final String APPLICATION_IPHONE = "application/x-iphone";
    public static final String APPLICATION_JAVASCRIPT = "application/x-javascript";
    public static final String APPLICATION_LATEX = "application/x-latex";
    public static final String APPLICATION_MAC_BINHEX40 = "application/mac-binhex40";
    public static final String APPLICATION_MS_ACCESS = "application/x-msaccess";
    public static final String APPLICATION_MS_CARD_FILE = "application/x-mscardfile";
    public static final String APPLICATION_MS_CLIP = "application/x-msclip";
    public static final String APPLICATION_MS_DOWNLOAD = "application/x-msdownload";
    public static final String APPLICATION_MS_EXCEL = "application/vnd.ms-excel";
    public static final String APPLICATION_MS_MEDIAVIEW = "application/x-msmediaview";
    public static final String APPLICATION_MS_METAFILE = "application/x-msmetafile";
    public static final String APPLICATION_MS_MONEY = "application/x-msmoney";
    public static final String APPLICATION_MS_OUTLOOK = "application/vnd.ms-outlook";
    public static final String APPLICATION_MS_PKICERTSTORE = "application/vnd.ms-pkicertstore";
    public static final String APPLICATION_MS_PKISECCAT = "application/vnd.ms-pkiseccat";
    public static final String APPLICATION_MS_PKISTL = "application/vnd.ms-pkistl";
    public static final String APPLICATION_MS_POWERPOINT = "application/vnd.ms-powerpoint";
    public static final String APPLICATION_MS_PROJECT = "application/vnd.ms-project";
    public static final String APPLICATION_MS_PUBLISHER = "application/x-mspublisher";
    public static final String APPLICATION_MS_SCHEDULE = "application/x-msschedule";
    public static final String APPLICATION_MS_TERMINAL = "application/x-msterminal";
    public static final String APPLICATION_MS_WORD = "application/msword";
    public static final String APPLICATION_MS_WORKS = "application/vnd.ms-works";
    public static final String APPLICATION_MS_WRITE = "application/x-mswrite";
    public static final String APPLICATION_NET_CDF = "application/x-netcdf";
    public static final String APPLICATION_OCTET_STREAM = "application/octet-stream";
    public static final String APPLICATION_ODA = "application/oda";
    public static final String APPLICATION_OLESCRIPT = "application/olescript";
    public static final String APPLICATION_PDF = "application/pdf";
    public static final String APPLICATION_PERFMON = "application/x-perfmon";
    public static final String APPLICATION_PICS_RULES = "application/pics-rules";
    public static final String APPLICATION_PKCS10 = "application/pkcs10";
    public static final String APPLICATION_PKCS_12 = "application/x-pkcs12";
    public static final String APPLICATION_PKCS_7_CERTIFICATES = "application/x-pkcs7-certificates";
    public static final String APPLICATION_PKCS_7_CERTREQRESP = "application/x-pkcs7-certreqresp";
    public static final String APPLICATION_PKCS_7_MIME = "application/x-pkcs7-mime";
    public static final String APPLICATION_PKCS_7_SIGNATURE = "application/x-pkcs7-signature";
    public static final String APPLICATION_PKIX_CRL = "application/pkix-crl";
    public static final String APPLICATION_PKO = "application/ynd.ms-pkipko";
    public static final String APPLICATION_POSTSCRIPT = "application/postscript";
    public static final String APPLICATION_RTF = "application/rtf";
    public static final String APPLICATION_SETPAY = "application/set-payment-initiation";
    public static final String APPLICATION_SETREG = "application/set-registration-initiation";
    public static final String APPLICATION_SH = "application/x-sh";
    public static final String APPLICATION_SHAR = "application/x-shar";
    public static final String APPLICATION_SHOCKWAVE_FLASH = "application/x-shockwave-flash";
    public static final String APPLICATION_STUFFIT = "application/x-stuffit";
    public static final String APPLICATION_SV4CPIO = "application/x-sv4cpio";
    public static final String APPLICATION_SV4CRC = "application/x-sv4crc";
    public static final String APPLICATION_TAR = "application/x-tar";
    public static final String APPLICATION_TCL = "application/x-tcl";
    public static final String APPLICATION_TEX = "application/x-tex";
    public static final String APPLICATION_TEXINFO = "application/x-texinfo";
    public static final String APPLICATION_TGZ = "application/x-compressed";
    public static final String APPLICATION_TROFF = "application/x-troff";
    public static final String APPLICATION_TROFF_MAN = "application/x-troff-man";
    public static final String APPLICATION_TROFF_ME = "application/x-troff-me";
    public static final String APPLICATION_TROFF_MS = "application/x-troff-ms";
    public static final String APPLICATION_USTAR = "application/x-ustar";
    public static final String APPLICATION_WAIS_SOURCE = "application/x-wais-source";
    public static final String APPLICATION_WINHLP = "application/winhlp";
    public static final String APPLICATION_X509_CA_CERT = "application/x-x509-ca-cert";
    public static final String APPLICATION_XML = "application/xml";
    public static final String APPLICATION_Z = "application/x-compress";
    public static final String APPLICATION_ZIP = "application/zip";
    private static final String AUDIO = "audio/";
    public static final String AUDIO_AIFF = "audio/x-aiff";
    public static final String AUDIO_BASIC = "audio/basic";
    public static final String AUDIO_M3U = "audio/x-mpegurl";
    public static final String AUDIO_MID = "audio/mid";
    public static final String AUDIO_MPEG = "audio/mpeg";
    public static final String AUDIO_REAL_AUDIO = "audio/x-pn-realaudio";
    public static final String AUDIO_WAV = "audio/x-wav";
    private static final String IMAGE = "image/";
    public static final String IMAGE_BMP = "image/bmp";
    public static final String IMAGE_CMU_RASTER = "image/x-cmu-raster";
    public static final String IMAGE_CMX = "image/x-cmx";
    public static final String IMAGE_COD = "image/cod";
    public static final String IMAGE_GIF = "image/gif";
    public static final String IMAGE_ICO = "image/x-icon";
    public static final String IMAGE_IEF = "image/ief";
    public static final String IMAGE_JPEG = "image/jpeg";
    public static final String IMAGE_PIPEG = "image/pipeg";
    public static final String IMAGE_PORTABLE_ANYMAP = "image/x-portable-anymap";
    public static final String IMAGE_PORTABLE_BITMAP = "image/x-portable-bitmap";
    public static final String IMAGE_PORTABLE_GRAYMAP = "image/x-portable-graymap";
    public static final String IMAGE_PORTABLE_PIXMAP = "image/x-portable-pixmap";
    public static final String IMAGE_SVG = "image/svg+xml";
    public static final String IMAGE_TIFF = "image/tiff";
    public static final String IMAGE_XBITMAP = "image/x-xbitmap";
    public static final String IMAGE_XPIXMAP = "image/x-xpixmap";
    public static final String IMAGE_XRGB = "image/x-rgb";
    public static final String IMAGE_XWINDOWDUMP = "image/x-xwindowdump";
    private static final String TEXT = "text/";
    public static final String TEXT_COMPONENT = "text/x-component";
    public static final String TEXT_CSS = "text/css";
    public static final String TEXT_CSV = "text/csv";
    public static final String TEXT_H323 = "text/h323";
    public static final String TEXT_HTML = "text/html";
    public static final String TEXT_IULS = "text/iuls";
    public static final String TEXT_PLAIN = "text/plain";
    public static final String TEXT_RICHTEXT = "text/richtext";
    public static final String TEXT_SCRIPTLET = "text/scriptlet";
    public static final String TEXT_SETEXT = "text/x-setext";
    public static final String TEXT_TAB_SEPARATED_VALUES = "text/tab-separated-values";
    public static final String TEXT_VCARD = "text/x-vcard";
    public static final String TEXT_VIEWVIEW = "text/webviewhtml";
    public static final String TEXT_XML = "text/xml";
    private static final String VIDEO = "video/";
    public static final String VIDEO_AVI = "video/avi";
    public static final String VIDEO_LA_ASF = "video/x-la-asf";
    public static final String VIDEO_MOVIE = "video/x-sgi-movie";
    public static final String VIDEO_MPEG = "video/mpeg";
    public static final String VIDEO_MPEG4 = "video/mp4";
    public static final String VIDEO_MS_ASF = "video/x-ms-asf";
    public static final String VIDEO_QUICKTIME = "video/quicktime";

    private ContentType() {
    }

    public static String autoDetect(String str) {
        int lastIndexOf = str.lastIndexOf(".") + 1;
        String substring = (lastIndexOf < 0 || lastIndexOf > str.length()) ? null : str.substring(lastIndexOf);
        if (substring == null || substring.isEmpty()) {
            return APPLICATION_OCTET_STREAM;
        }
        String mimeTypeFromExtension = MimeTypeMap.getSingleton().getMimeTypeFromExtension(substring.toLowerCase());
        return mimeTypeFromExtension == null ? "mp4".equalsIgnoreCase(substring) ? VIDEO_MPEG4 : APPLICATION_OCTET_STREAM : mimeTypeFromExtension;
    }
}
