Class MimeType

java.lang.Object
com.ithit.webdav.server.MimeType

public class MimeType extends Object
Provides functionality for getting mime type by file extension.
  • Method Details

    • getInstance

      public static MimeType getInstance()
    • ExtendTypesTable

      public void ExtendTypesTable(String extension, String mimeType)
      Extends the list of content types or replaces existing value with a new one.
      Parameters:
      extension - File extension.
      mimeType - File mime type.
    • getMimeType

      public String getMimeType(String extension)
      Returns the mime type corresponding to file extension.
      Parameters:
      extension - File extension.
      Returns:
      String representing mime-type or null if mime-type was not found for the specified extension.