public interface MailcapRegistry
Application must implement 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
MailcapRegistryProvider
methods.
Implementation of the MailcapRegistry must contain in-memory storage for MailcapEntries.
Modifier and Type | Method and Description |
---|---|
void |
appendToMailcap(java.lang.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
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMailcapFallbackList(java.lang.String mime_type)
Get the Map of fallback MailcapEntries based on the MIME type.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getMailcapList(java.lang.String mime_type)
Get the Map of MailcapEntries based on the MIME type.
|
java.lang.String[] |
getMimeTypes()
Return all the MIME types known to this mailcap file.
|
java.lang.String[] |
getNativeCommands(java.lang.String mime_type)
Return all the native comands for the given MIME type.
|
java.util.Map<java.lang.String,java.util.List<java.lang.String>> getMailcapList(java.lang.String 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.
mime_type
- the MIME typejava.util.Map<java.lang.String,java.util.List<java.lang.String>> getMailcapFallbackList(java.lang.String 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.
mime_type
- the MIME typejava.lang.String[] getMimeTypes()
java.lang.String[] getNativeCommands(java.lang.String mime_type)
mime_type
- the MIME typevoid appendToMailcap(java.lang.String mail_cap)
mail_cap
- the mailcap string