Class MimeType

java.lang.Object
org.compiere.util.MimeType

public class MimeType extends Object
Mime - Content type map. http://www.iana.org/assignments/media-types/
Version:
$Id: MimeType.java,v 1.2 2006/07/30 00:54:35 jjanke Exp $
Author:
Jorg Janke
  • Field Details

    • BINARY

      public static String BINARY
      application/octet-stream
    • TYPES

      public static final String[][] TYPES
      Mime / Content Type Map
  • Constructor Details

    • MimeType

      public MimeType(String extension, String mimeType)
      MimeType
      Parameters:
      extension - extension (with dot)
      mimeType - mime type
  • Method Details

    • getMimeType

      public static String getMimeType(String fileName)
      Get Mime Type of file name
      Parameters:
      fileName - file name
      Returns:
      mime type
    • get

      public static MimeType get(String fileName)
      Get Mime Type of file name
      Parameters:
      fileName - file name
      Returns:
      mime type
    • getExtension

      public String getExtension()
      Returns:
      Returns the extension.
    • setExtension

      public void setExtension(String extension)
      Parameters:
      extension - The extension to set.
    • getMimeType

      public String getMimeType()
      Returns:
      Returns the Mime Type (Content Type).
    • setMimeType

      public void setMimeType(String mimeType)
      Parameters:
      mimeType - The mimeType to set.
    • toString

      public String toString()
      String representation
      Overrides:
      toString in class Object
      Returns:
      info