javax.activation
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(InputStream is)
Constructor specifying an input stream.
|
MailcapCommandMap(String fileName)
Constructor specifying a filename.
|
Modifier and Type | Method and Description |
---|---|
void |
addMailcap(String mailcap)
Adds entries programmatically to the registry.
|
DataContentHandler |
createDataContentHandler(String mimeType)
Returns the DCH for the specified MIME type.
|
CommandInfo[] |
getAllCommands(String mimeType)
Returns all commands for the given MIME type.
|
CommandInfo |
getCommand(String mimeType,
String cmdName)
Returns the command with the specified name for the given MIME type.
|
String[] |
getNativeCommands(String mimeType)
Get the native commands for the given MIME type.
|
CommandInfo[] |
getPreferredCommands(String mimeType)
Returns the list of preferred commands for a given MIME type.
|
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getMimeTypes, getPreferredCommands, setDefaultCommandMap
public MailcapCommandMap()
public MailcapCommandMap(String fileName) throws IOException
fileName
- the name of the file to read mailcap entries fromIOException
public MailcapCommandMap(InputStream is)
is
- the input stream to read mailcap entries frompublic CommandInfo[] getPreferredCommands(String mimeType)
getPreferredCommands
in class CommandMap
mimeType
- the MIME typepublic CommandInfo[] getAllCommands(String mimeType)
getAllCommands
in class CommandMap
mimeType
- the MIME typepublic CommandInfo getCommand(String mimeType, String cmdName)
getCommand
in class CommandMap
mimeType
- the MIME typecmdName
- the command verbpublic void addMailcap(String mailcap)
mailcap
- a mailcap stringpublic DataContentHandler createDataContentHandler(String mimeType)
createDataContentHandler
in class CommandMap
mimeType
- the MIME typepublic String[] getNativeCommands(String mimeType)