Interface MimeRegistry

All Known Implementing Classes:
DefaultMimeRegistry

public interface MimeRegistry
The MimeRegistry encodes content-type information and allows to detect or query the file type of a given content item. It also assists in naming files by providing a default suffix for a given mime-type.
Author:
Thomas Morgner
  • Method Summary

    Modifier and Type
    Method
    Description
    Queries the mime-type for a given content-item.
    getSuffix(String mimeType)
    Returns the default suffix for files with the given content type.
  • Method Details

    • getMimeType

      String getMimeType(ContentItem item)
      Queries the mime-type for a given content-item. Some repositories store mime-type information along with the content data, while others might resort to heuristics based on the filename or actual data stored in the item.
      Parameters:
      item - the content item for which Mime-Data should be queried.
      Returns:
      the mime-type never null.
    • getSuffix

      String getSuffix(String mimeType)
      Returns the default suffix for files with the given content type.
      Parameters:
      mimeType - the mime-type for which a suffix is queried.
      Returns:
      the suffix, never null.