Top Description Methods
jakarta.activation

public Interface MailcapRegistry

Imports
java.util.List, .Map

The MailcapRegistry interface is implemented by objects that can be used to store and retrieve MailcapEntries.

Application must implement jakarta.activation.spi.MailcapRegistryProvider to create new instances of the MailcapRegistry. Implementation of the MailcapRegistry can store MailcapEntries in different ways and that storage must be accessible through the jakarta.activation.spi.MailcapRegistryProvider methods. Implementation of the MailcapRegistry must contain in-memory storage for MailcapEntries.

Method Summary

Modifier and TypeMethod and Description
public void
appendToMailcap(String
the mailcap string
mail_cap
)

appendToMailcap: Append to this Mailcap DB, use the mailcap format: Comment == "# comment string" Entry == "mimetype; javabeanclass" Example: # this is a comment image/gif jaf.viewers.ImageViewer

public Map<String, List<String>>

Returns:

the map of fallback MailcapEntries
getMailcapFallbackList
(String
the MIME type
mime_type
)

Get the Map of fallback MailcapEntries based on the MIME type.

public Map<String, List<String>>

Returns:

the map of MailcapEntries
getMailcapList
(String
the MIME type
mime_type
)

Get the Map of MailcapEntries based on the MIME type.

public String[]

Returns:

a String array of the MIME types
getMimeTypes
()

Return all the MIME types known to this mailcap file.

public String[]

Returns:

a String array of the commands
getNativeCommands
(String
the MIME type
mime_type
)

Return all the native comands for the given MIME type.

Method Detail

appendToMailcapback to summary
public void appendToMailcap(String mail_cap)

appendToMailcap: Append to this Mailcap DB, use the mailcap format: Comment == "# comment string" Entry == "mimetype; javabeanclass" Example: # this is a comment image/gif jaf.viewers.ImageViewer

Parameters
mail_cap:String

the mailcap string

getMailcapFallbackListback to summary
public Map<String, List<String>> getMailcapFallbackList(String mime_type)

Get the Map of fallback MailcapEntries based on the MIME type.

Semantics: First check for the literal mime type, if that fails looks for wildcard <type>/\* and return that. Return the list of all that hit.

Parameters
mime_type:String

the MIME type

Returns:Map<String, List<String>>

the map of fallback MailcapEntries

getMailcapListback to summary
public Map<String, List<String>> getMailcapList(String mime_type)

Get the Map of MailcapEntries based on the MIME type.

Semantics: First check for the literal mime type, if that fails looks for wildcard <type>/\* and return that. Return the list of all that hit.

Parameters
mime_type:String

the MIME type

Returns:Map<String, List<String>>

the map of MailcapEntries

getMimeTypesback to summary
public String[] getMimeTypes()

Return all the MIME types known to this mailcap file.

Returns:String[]

a String array of the MIME types

getNativeCommandsback to summary
public String[] getNativeCommands(String mime_type)

Return all the native comands for the given MIME type.

Parameters
mime_type:String

the MIME type

Returns:String[]

a String array of the commands