Class Mime

java.lang.Object
net.targetr.wtm3.cache.Mime

public class Mime extends Object
Maps resource path extensions to HTTP content types, including UTF-8 charset parameters for supported text formats. Unknown extensions use application/octet-stream.
  • Constructor Details

    • Mime

      public Mime()
      Creates a MIME type helper; lookups are available through static methods.
  • Method Details

    • getContentType

      public static String getContentType(String path)
      Guesses the MIME type from a given request path extension.
      Parameters:
      path - the resource's network path
      Returns:
      the matching predefined content type, or application/octet-stream if the extension is absent or unknown