Skip to content

Instantly share code, notes, and snippets.

@markwhitaker
Last active August 17, 2021 10:21
Show Gist options
  • Select an option

  • Save markwhitaker/8a154938f5a0d99fac22c8521230489c to your computer and use it in GitHub Desktop.

Select an option

Save markwhitaker/8a154938f5a0d99fac22c8521230489c to your computer and use it in GitHub Desktop.

Revisions

  1. Mark Whitaker revised this gist May 29, 2021. No changes.
  2. Mark Whitaker renamed this gist Aug 11, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. Mark Whitaker revised this gist Aug 11, 2020. 1 changed file with 21 additions and 0 deletions.
    21 changes: 21 additions & 0 deletions LICENSE
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,21 @@
    MIT License

    Copyright (c) 2017 Mark Whitaker

    Permission is hereby granted, free of charge, to any person obtaining a copy
    of this software and associated documentation files (the "Software"), to deal
    in the Software without restriction, including without limitation the rights
    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
    copies of the Software, and to permit persons to whom the Software is
    furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all
    copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
    SOFTWARE.
  4. Mark Whitaker created this gist Sep 4, 2017.
    102 changes: 102 additions & 0 deletions MimeTypes.java
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,102 @@
    public final class MimeTypes
    {
    public static final class Application
    {
    public static final String ATOM_XML = "application/atom+xml";
    public static final String ATOMCAT_XML = "application/atomcat+xml";
    public static final String ECMASCRIPT = "application/ecmascript";
    public static final String JAVA_ARCHIVE = "application/java-archive";
    public static final String JAVASCRIPT = "application/javascript";
    public static final String JSON = "application/json";
    public static final String MP4 = "application/mp4";
    public static final String OCTET_STREAM = "application/octet-stream";
    public static final String PDF = "application/pdf";
    public static final String PKCS_10 = "application/pkcs10";
    public static final String PKCS_7_MIME = "application/pkcs7-mime";
    public static final String PKCS_7_SIGNATURE = "application/pkcs7-signature";
    public static final String PKCS_8 = "application/pkcs8";
    public static final String POSTSCRIPT = "application/postscript";
    public static final String RDF_XML = "application/rdf+xml";
    public static final String RSS_XML = "application/rss+xml";
    public static final String RTF = "application/rtf";
    public static final String SMIL_XML = "application/smil+xml";
    public static final String X_FONT_OTF = "application/x-font-otf";
    public static final String X_FONT_TTF = "application/x-font-ttf";
    public static final String X_FONT_WOFF = "application/x-font-woff";
    public static final String X_PKCS_12 = "application/x-pkcs12";
    public static final String X_SHOCKWAVE_FLASH = "application/x-shockwave-flash";
    public static final String X_SILVERLIGHT_APP = "application/x-silverlight-app";
    public static final String XHTML_XML = "application/xhtml+xml";
    public static final String XML = "application/xml";
    public static final String XML_DTD = "application/xml-dtd";
    public static final String XSLT_XML = "application/xslt+xml";
    public static final String ZIP = "application/zip";

    private Application()
    {
    }
    }

    public static final class Audio
    {
    public static final String MIDI = "audio/midi";
    public static final String MP4 = "audio/mp4";
    public static final String MPEG = "audio/mpeg";
    public static final String OGG = "audio/ogg";
    public static final String WEBM = "audio/webm";
    public static final String X_AAC = "audio/x-aac";
    public static final String X_AIFF = "audio/x-aiff";
    public static final String X_MPEGURL = "audio/x-mpegurl";
    public static final String X_MS_WMA = "audio/x-ms-wma";
    public static final String X_WAV = "audio/x-wav";

    private Audio()
    {
    }
    }

    public static final class Image
    {
    public static final String BMP = "image/bmp";
    public static final String GIF = "image/gif";
    public static final String JPEG = "image/jpeg";
    public static final String PNG = "image/png";
    public static final String SVG_XML = "image/svg+xml";
    public static final String TIFF = "image/tiff";
    public static final String WEBP = "image/webp";

    private Image()
    {
    }
    }

    public static final class Text
    {
    public static final String CSS = "text/css";
    public static final String CSV = "text/csv";
    public static final String HTML = "text/html";
    public static final String PLAIN = "text/plain";
    public static final String RICH_TEXT = "text/richtext";
    public static final String SGML = "text/sgml";
    public static final String YAML = "text/yaml";

    private Text()
    {
    }
    }

    public static final class Video
    {
    public static final String THREEGPP = "video/3gpp";
    public static final String H264 = "video/h264";
    public static final String MP4 = "video/mp4";
    public static final String MPEG = "video/mpeg";
    public static final String OGG = "video/ogg";
    public static final String QUICKTIME = "video/quicktime";
    public static final String WEBM = "video/webm";

    private Video()
    {
    }
    }
    }