Adempiere 3.5.2a

org.compiere.util
Class MimeType

java.lang.Object
  extended by 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 Summary
static String BINARY
          application/octet-stream
static String[][] TYPES
          Mime / Content Type Map
 
Constructor Summary
MimeType(String extension, String mimeType)
          MimeType
 
Method Summary
static MimeType get(String fileName)
          Get Mime Type of file name
 String getExtension()
           
 String getMimeType()
           
static String getMimeType(String fileName)
          Get Mime Type of file name
 void setExtension(String extension)
           
 void setMimeType(String mimeType)
           
 String toString()
          String representation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BINARY

public static String BINARY
application/octet-stream


TYPES

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

Constructor Detail

MimeType

public MimeType(String extension,
                String mimeType)
MimeType

Parameters:
extension - extension (with dot)
mimeType - mime type
Method Detail

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

Adempiere 3.5.2a

Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.