|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.activation.CommandMap
ch.randelshofer.activation.BasicCommandMap
public class BasicCommandMap
This CommandMap supports multiple commands for the same MIME type.
| Constructor Summary | |
|---|---|
BasicCommandMap()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class javax.activation.CommandMap |
|---|
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getMimeTypes, getPreferredCommands, setDefaultCommandMap |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicCommandMap()
| Method Detail |
|---|
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.IOException
public 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.CommandMap
public 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
|
Copyright 2012-02-25 Werner Randelshofer | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||