javax.activation
类 FileTypeMap

java.lang.Object
  继承者 javax.activation.FileTypeMap
直接已知子类:
MimetypesFileTypeMap

public abstract class FileTypeMap
extends Object

FileTypeMap is an abstract class that provides a data type interface for files.

版本:
$Rev: 467742 $ $Date: 2011/05/07 04:32:39 $

构造方法摘要
FileTypeMap()
           
 
方法摘要
abstract  String getContentType(File file)
           
abstract  String getContentType(String filename)
           
static FileTypeMap getDefaultFileTypeMap()
          Returns the default FileTypeMap
static void setDefaultFileTypeMap(FileTypeMap fileMap)
          Sets the default FileTypeMap for the system.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

FileTypeMap

public FileTypeMap()
方法详细信息

setDefaultFileTypeMap

public static void setDefaultFileTypeMap(FileTypeMap fileMap)
Sets the default FileTypeMap for the system.

参数:
fileMap - the new default FileTypeMap
抛出:
SecurityException - if the caller does not have "SetFactory" RuntimePermission

getDefaultFileTypeMap

public static FileTypeMap getDefaultFileTypeMap()
Returns the default FileTypeMap

返回:
the default FileTYpeMap; if null returns a MimetypesFileTypeMap

getContentType

public abstract String getContentType(File file)

getContentType

public abstract String getContentType(String filename)


Copyright © 2013. All Rights Reserved.