javax.activation
Class MailcapCommandMap

java.lang.Object
  extended by javax.activation.CommandMap
      extended by javax.activation.MailcapCommandMap

public class MailcapCommandMap
extends CommandMap

Version:
$Rev: 467742 $ $Date: 2006-10-25 21:30:38 +0200 (Wed, 25 Oct 2006) $

Constructor Summary
MailcapCommandMap()
           
MailcapCommandMap(java.io.InputStream is)
           
MailcapCommandMap(java.lang.String fileName)
           
 
Method Summary
 void addMailcap(java.lang.String mail_cap)
           
 DataContentHandler createDataContentHandler(java.lang.String mimeType)
          Locate a DataContentHandler for the given mime type.
 CommandInfo[] getAllCommands(java.lang.String mimeType)
          Get all available commands for the given mimetype.
 CommandInfo getCommand(java.lang.String mimeType, java.lang.String cmdName)
          Get the default command implementation for a give mimeType
 java.lang.String[] getMimeTypes()
          Get all MIME types known to this command map.
 java.lang.String[] getNativeCommands(java.lang.String mimeType)
          Return the list of raw command strings parsed from the mailcap files for a given mimeType.
 CommandInfo[] getPreferredCommands(java.lang.String mimeType)
          Get the preferred commands for the given mimetype.
 
Methods inherited from class javax.activation.CommandMap
createDataContentHandler, getAllCommands, getCommand, getDefaultCommandMap, getPreferredCommands, setDefaultCommandMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailcapCommandMap

public MailcapCommandMap()

MailcapCommandMap

public MailcapCommandMap(java.lang.String fileName)
                  throws java.io.IOException
Throws:
java.io.IOException

MailcapCommandMap

public MailcapCommandMap(java.io.InputStream is)
Method Detail

addMailcap

public void addMailcap(java.lang.String mail_cap)

getPreferredCommands

public CommandInfo[] getPreferredCommands(java.lang.String mimeType)
Description copied from class: CommandMap
Get the preferred commands for the given mimetype. The concrete implementations define the actual behaviour.

Specified by:
getPreferredCommands in class CommandMap
Parameters:
mimeType - The mimeType name.
Returns:
The array of CommandInfo[] objects associated with this mimeType combo.

getAllCommands

public CommandInfo[] getAllCommands(java.lang.String mimeType)
Description copied from class: CommandMap
Get all available commands for the given mimetype. The concrete implementations define the actual behaviour.

Specified by:
getAllCommands in class CommandMap
Parameters:
mimeType - The mimeType name.
Returns:
The array of CommandInfo[] objects associated with this mimeType combo.

getCommand

public CommandInfo getCommand(java.lang.String mimeType,
                              java.lang.String cmdName)
Description copied from class: CommandMap
Get the default command implementation for a give mimeType

Specified by:
getCommand in class CommandMap
Parameters:
mimeType - The name of the mime type
cmdName - The command action we wish to perform.
Returns:
A CommandInfo object corresponding to the command mapping.

createDataContentHandler

public DataContentHandler createDataContentHandler(java.lang.String mimeType)
Description copied from class: CommandMap
Locate a DataContentHandler for the given mime type. The concrete implementations determine how this mapping is performed.

Specified by:
createDataContentHandler in class CommandMap
Parameters:
mimeType - The target MIME type.
Returns:
The DataContentHandler for the MIME type.

getMimeTypes

public java.lang.String[] getMimeTypes()
Get all MIME types known to this command map.

Overrides:
getMimeTypes in class CommandMap
Returns:
A String array of the MIME type names.

getNativeCommands

public java.lang.String[] getNativeCommands(java.lang.String mimeType)
Return the list of raw command strings parsed from the mailcap files for a given mimeType.

Parameters:
mimeType - The target mime type
Returns:
A String array of the raw command strings. Returns an empty array if the mimetype is not currently known.


Copyright © {inceptionYear}-2007 null. All Rights Reserved.