com.sun.media
类 MimeManager

java.lang.Object
  继承者 com.sun.media.MimeManager

public final class MimeManager
extends java.lang.Object


字段摘要
protected static java.util.Hashtable defaultHashTable
           
protected static java.util.Hashtable extTable
           
 
方法摘要
static boolean addMimeType(java.lang.String fileExtension, java.lang.String mimeType)
          Specify a mapping from a file extension to a mime type example addMimeType("urv", "video/unreal") You cannot override built-in mappings; for example you cannot change the mapping of "mov" file extension Returns true if the mapping was successfully made
static void commit()
          Commit the changes
static java.lang.String getDefaultExtension(java.lang.String mimeType)
           
static java.util.Hashtable getDefaultMimeTable()
          Returns the mime table which doesn't include any entries that were added using addMimeType.
static java.util.Hashtable getMimeTable()
          Returns the mime table.
static java.lang.String getMimeType(java.lang.String fileExtension)
           
static boolean removeMimeType(java.lang.String fileExtension)
          Only the mime types that were added using addMimeType can be removed with this method.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

defaultHashTable

protected static final java.util.Hashtable defaultHashTable

extTable

protected static final java.util.Hashtable extTable
方法详细信息

addMimeType

public static final boolean addMimeType(java.lang.String fileExtension,
                                        java.lang.String mimeType)
Specify a mapping from a file extension to a mime type example addMimeType("urv", "video/unreal") You cannot override built-in mappings; for example you cannot change the mapping of "mov" file extension Returns true if the mapping was successfully made


removeMimeType

public static final boolean removeMimeType(java.lang.String fileExtension)
Only the mime types that were added using addMimeType can be removed with this method. Returns true if the mapping was successfully removed


getMimeType

public static final java.lang.String getMimeType(java.lang.String fileExtension)

getMimeTable

public static final java.util.Hashtable getMimeTable()
Returns the mime table. This includes any mime entries that were added using addMimeType


getDefaultMimeTable

public static final java.util.Hashtable getDefaultMimeTable()
Returns the mime table which doesn't include any entries that were added using addMimeType.


getDefaultExtension

public static final java.lang.String getDefaultExtension(java.lang.String mimeType)

commit

public static void commit()
Commit the changes