Class MimeTypeUtil


  • public class MimeTypeUtil
    extends Object
    Author:
    Madhav Krishna
    • Method Detail

      • getFileExtensionFromMediaType

        public static String getFileExtensionFromMediaType​(String mediaType)
        Returns the file extension based on the media type.
        Parameters:
        mediaType -
        Returns:
      • getBinaryFileExtension

        public static String getBinaryFileExtension​(String mediaType)
        Returns the extension of the file if that media type belongs to binary file.
        Parameters:
        mediaType -
        Returns:
      • findMediaTypeForFile

        public static String findMediaTypeForFile​(String absluteFilePath)
        Detects the media type for file.
        Parameters:
        absluteFilePath -
        Returns: