Interface IMimeUtil


public interface IMimeUtil
  • Method Details

    • getContentTypeFromLocation

      String getContentTypeFromLocation(String location)
      Returns the appropriate mime type for this file location
      Parameters:
      location -
      Returns:
    • getMimeType

      String getMimeType(String ext)
      Returns the appropriate mime type for the extension
      Parameters:
      ext - might be: .xls
      Returns:
      the result mimeTypeRaw for example: image/jpeg
    • getEncoding

      String getEncoding(String mimeType)
      Returns encoding from mimeType string, null if not defined
      Parameters:
      mimeType -
      Returns:
    • setEncoding

      String setEncoding(String mimeType, String encoding)
    • getMimeExtension

      String getMimeExtension(String mimeType)
      Get the appropriate extension for any given mime type
      Parameters:
      mimeType - for example: image/jpeg
      Returns:
      the appropriate extension for example: .jpg
    • isCompressed

      boolean isCompressed(String mimeType)
      Returns whether this is a compressed mimeType
      Parameters:
      mimeType - for example: image/jpeg
      Returns:
      true, if compressed, false otherwise... Defaults to true
    • isStreaming

      boolean isStreaming(String mimeType)
      Returns whether this is a streaming media mimeType
      Parameters:
      mimeType - for example: video/avi
      Returns:
      true, if streaming, false otherwise... Defaults to false
    • stripEncoding

      String stripEncoding(String mimeType)
      Strips any encoding from this mime-type
      Parameters:
      mimeType -
      Returns: