public class MailcapCommandMap extends CommandMap
mailcap file (RFC
1524). Mailcap files are searched for in the following places:
| Constructor and Description |
|---|
MailcapCommandMap()
Default constructor.
|
MailcapCommandMap(java.io.InputStream is)
Constructor specifying an input stream.
|
MailcapCommandMap(java.lang.String fileName)
Constructor specifying a filename.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addMailcap(java.lang.String mail_cap)
Adds entries programmatically to the registry.
|
DataContentHandler |
createDataContentHandler(java.lang.String mimeType)
Returns the DCH for the specified MIME type.
|
CommandInfo[] |
getAllCommands(java.lang.String mimeType)
Returns all commands for the given MIME type.
|
CommandInfo |
getCommand(java.lang.String mimeType,
java.lang.String cmdName)
Returns the command with the specified name for the given MIME type.
|
java.lang.String[] |
getNativeCommands(java.lang.String mimeType)
Get the native commands for the given MIME type.
|
CommandInfo[] |
getPreferredCommands(java.lang.String mimeType)
Returns the list of preferred commands for a given MIME type.
|
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getMimeTypes, getPreferredCommands, setDefaultCommandMappublic MailcapCommandMap()
public MailcapCommandMap(java.lang.String fileName)
throws java.io.IOException
fileName - the name of the file to read mailcap entries fromjava.io.IOExceptionpublic MailcapCommandMap(java.io.InputStream is)
is - the input stream to read mailcap entries frompublic CommandInfo[] getPreferredCommands(java.lang.String mimeType)
getPreferredCommands in class CommandMapmimeType - the MIME typepublic CommandInfo[] getAllCommands(java.lang.String mimeType)
getAllCommands in class CommandMapmimeType - the MIME typepublic CommandInfo getCommand(java.lang.String mimeType, java.lang.String cmdName)
getCommand in class CommandMapmimeType - the MIME typecmdName - the command verbpublic void addMailcap(java.lang.String mail_cap)
mail_cap - a mailcap stringpublic DataContentHandler createDataContentHandler(java.lang.String mimeType)
createDataContentHandler in class CommandMapmimeType - the MIME typepublic java.lang.String[] getNativeCommands(java.lang.String mimeType)