javax.activation
Class CommandMap
java.lang.Object
javax.activation.CommandMap
public abstract class CommandMap
extends java.lang.Object
Registry of command objects available to the system.
createDataContentHandler
public DataContentHandler createDataContentHandler(String mimeType)
Returns a DataContentHandler corresponding to the MIME type.
mimeType
- the MIME type
getAllCommands
public CommandInfo[] getAllCommands(String mimeType)
Returns the complete list of commands for a MIME type.
mimeType
- the MIME type
getCommand
public CommandInfo getCommand(String mimeType,
String cmdName)
Returns the command corresponding to the specified MIME type and
command name.
mimeType
- the MIME typecmdName
- the command name
getDefaultCommandMap
public static CommandMap getDefaultCommandMap()
Returns the default command map.
This returns a MailcapCommandMap if no value has been set using
setDefaultCommandMap
.
getPreferredCommands
public CommandInfo[] getPreferredCommands(String mimeType)
Returns the list of preferred commands for a MIME type.
mimeType
- the MIME type
setDefaultCommandMap
public static void setDefaultCommandMap(CommandMap commandMap)
Sets the default command map.
commandMap
- the new default command map