javax.activation
类 MailcapCommandMap

java.lang.Object
  继承者 javax.activation.CommandMap
      继承者 javax.activation.MailcapCommandMap

public class MailcapCommandMap
extends CommandMap

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

构造方法摘要
MailcapCommandMap()
           
MailcapCommandMap(InputStream is)
           
MailcapCommandMap(String fileName)
           
 
方法摘要
 void addMailcap(String mail_cap)
           
 DataContentHandler createDataContentHandler(String mimeType)
          Locate a DataContentHandler for the given mime type.
 CommandInfo[] getAllCommands(String mimeType)
          Get all available commands for the given mimetype.
 CommandInfo getCommand(String mimeType, String cmdName)
          Get the default command implementation for a give mimeType
 String[] getMimeTypes()
          Get all MIME types known to this command map.
 String[] getNativeCommands(String mimeType)
          Return the list of raw command strings parsed from the mailcap files for a given mimeType.
 CommandInfo[] getPreferredCommands(String mimeType)
          Get the preferred commands for the given mimetype.
 
从类 javax.activation.CommandMap 继承的方法
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getPreferredCommands, setDefaultCommandMap
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

MailcapCommandMap

public MailcapCommandMap()

MailcapCommandMap

public MailcapCommandMap(String fileName)
                  throws IOException
抛出:
IOException

MailcapCommandMap

public MailcapCommandMap(InputStream is)
方法详细信息

addMailcap

public void addMailcap(String mail_cap)

getPreferredCommands

public CommandInfo[] getPreferredCommands(String mimeType)
从类 CommandMap 复制的描述
Get the preferred commands for the given mimetype. The concrete implementations define the actual behaviour.

指定者:
CommandMap 中的 getPreferredCommands
参数:
mimeType - The mimeType name.
返回:
The array of CommandInfo[] objects associated with this mimeType combo.

getAllCommands

public CommandInfo[] getAllCommands(String mimeType)
从类 CommandMap 复制的描述
Get all available commands for the given mimetype. The concrete implementations define the actual behaviour.

指定者:
CommandMap 中的 getAllCommands
参数:
mimeType - The mimeType name.
返回:
The array of CommandInfo[] objects associated with this mimeType combo.

getCommand

public CommandInfo getCommand(String mimeType,
                              String cmdName)
从类 CommandMap 复制的描述
Get the default command implementation for a give mimeType

指定者:
CommandMap 中的 getCommand
参数:
mimeType - The name of the mime type
cmdName - The command action we wish to perform.
返回:
A CommandInfo object corresponding to the command mapping.

createDataContentHandler

public DataContentHandler createDataContentHandler(String mimeType)
从类 CommandMap 复制的描述
Locate a DataContentHandler for the given mime type. The concrete implementations determine how this mapping is performed.

指定者:
CommandMap 中的 createDataContentHandler
参数:
mimeType - The target MIME type.
返回:
The DataContentHandler for the MIME type.

getMimeTypes

public String[] getMimeTypes()
Get all MIME types known to this command map.

覆盖:
CommandMap 中的 getMimeTypes
返回:
A String array of the MIME type names.

getNativeCommands

public String[] getNativeCommands(String mimeType)
Return the list of raw command strings parsed from the mailcap files for a given mimeType.

参数:
mimeType - The target mime type
返回:
A String array of the raw command strings. Returns an empty array if the mimetype is not currently known.


Copyright © 2013. All Rights Reserved.