Class TikaMimeTypeChecker

java.lang.Object
dk.gtz.graphedit.serialization.TikaMimeTypeChecker
All Implemented Interfaces:
IMimeTypeChecker

public class TikaMimeTypeChecker extends Object implements IMimeTypeChecker
MIME type checker implementation using the Tika's implementation
  • Constructor Details

    • TikaMimeTypeChecker

      public TikaMimeTypeChecker()
      Construct a new instance
  • Method Details

    • getMimeType

      public String getMimeType(Path path) throws IOException
      Description copied from interface: IMimeTypeChecker
      Get the MIME type of some file path.
      Specified by:
      getMimeType in interface IMimeTypeChecker
      Parameters:
      path - a file path
      Returns:
      MIME type string. null if the mime type is not recognized
      Throws:
      IOException - if the path does not point to a proper file
    • getMimeType

      public String getMimeType(String filePath) throws IOException
      Description copied from interface: IMimeTypeChecker
      Get the MIME type of some file path string.
      Specified by:
      getMimeType in interface IMimeTypeChecker
      Parameters:
      filePath - a file path string
      Returns:
      MIME type string. null if the mime type is not recognized
      Throws:
      IOException - if the path does not point to a proper file