public class BasicCommandMap
extends javax.activation.CommandMap
| Constructor and Description |
|---|
BasicCommandMap() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCommand(java.lang.String mimeType,
java.lang.String cmdVerb,
java.lang.String cmdClass)
Adds a command to the map.
|
void |
addCommandInfo(java.lang.String mimeType,
javax.activation.CommandInfo info)
Adds a command info to the map.
|
void |
addCommands(java.io.Reader in)
Adds commands provided by the input stream to the map.
|
javax.activation.DataContentHandler |
createDataContentHandler(java.lang.String mimeType)
Locate a DataContentHandler that corresponds to the MIME type.
|
javax.activation.CommandInfo[] |
getAllCommands(java.lang.String mimeType)
Get all available commands for this type.
|
javax.activation.CommandInfo |
getCommand(java.lang.String mimeType,
java.lang.String cmdName)
Get the default command corresponding to
the MIME type.
|
javax.activation.CommandInfo[] |
getPreferredCommands(java.lang.String mimeType)
Get the preferred command list from a MIME type.
|
public void addCommand(java.lang.String mimeType,
java.lang.String cmdVerb,
java.lang.String cmdClass)
mimeType - The MIME type of the command.cmdVerb - The command verb.cmdClass - The class name of the java bean that executes to verb.public void addCommands(java.io.Reader in)
throws java.io.IOException
# Comments begin with a '#' and continue to the end of the line.
<mime type>; ; <parameter list>
# Where a parameter list consists of one or more parameters,
# where parameters look like: x-java-view=com.sun.TextViewer
# and a parameter list looks like:
text/plain; ; x-java-view=com.sun.TextViewer; x-java-edit=com.sun.TextEdit
# Note that mailcap entries that do not contain 'x-java' parameters
# and comply to RFC 1524 are simply ignored:
image/gif; /usr/dt/bin/sdtimage %s
in - The Reader providing the commands.java.io.IOExceptionpublic void addCommandInfo(java.lang.String mimeType,
javax.activation.CommandInfo info)
mimeType - The MIME type of the command.info - A CommandInfo object representing the command.public javax.activation.CommandInfo[] getPreferredCommands(java.lang.String mimeType)
getPreferredCommands in class javax.activation.CommandMappublic javax.activation.CommandInfo[] getAllCommands(java.lang.String mimeType)
getAllCommands in class javax.activation.CommandMappublic javax.activation.CommandInfo getCommand(java.lang.String mimeType,
java.lang.String cmdName)
getCommand in class javax.activation.CommandMappublic javax.activation.DataContentHandler createDataContentHandler(java.lang.String mimeType)
createDataContentHandler in class javax.activation.CommandMap