Class MimeTypeHelper

java.lang.Object
org.apache.camel.util.MimeTypeHelper

public class MimeTypeHelper extends Object
  • Constructor Details

  • Method Details

    • sanitizeMimeType

      public static String sanitizeMimeType(String types)
      Sanitizes the mime types after URL encoding to convert space into plus sign.
      Parameters:
      types - mime types such as from HTTP Accept header
      Returns:
      the sanitized mime types
    • probeMimeType

      public static String probeMimeType(String fileName)
      Probes the file name to determine the mime type (such as application/xml, text/plain).
      Parameters:
      fileName - the file name, such as order.xml
      Returns:
      the mime type, or null if not possible to determine.