javax.activation API v.1.1 1.1.1-redhat-2

com.sun.activation.registries
Class MailcapFile

java.lang.Object
  extended by com.sun.activation.registries.MailcapFile

public class MailcapFile
extends Object


Constructor Summary
MailcapFile()
          Mailcap file default constructor.
MailcapFile(InputStream is)
          The constructor that takes an input stream as an argument.
MailcapFile(String new_fname)
          The constructor that takes a filename as an argument.
 
Method Summary
 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
 Map getMailcapFallbackList(String mime_type)
          Get the Map of fallback MailcapEntries based on the MIME type.
 Map getMailcapList(String mime_type)
          Get the Map of MailcapEntries based on the MIME type.
 String[] getMimeTypes()
          Return all the MIME types known to this mailcap file.
 String[] getNativeCommands(String mime_type)
          Return all the native comands for the given MIME type.
protected  void parseLine(String mailcapEntry)
          A routine to parse individual entries in a Mailcap file.
protected static void reportParseError(int expectedToken, int otherExpectedToken, int anotherExpectedToken, int actualToken, String actualTokenValue)
           
protected static void reportParseError(int expectedToken, int otherExpectedToken, int actualToken, String actualTokenValue)
           
protected static void reportParseError(int expectedToken, int actualToken, String actualTokenValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MailcapFile

public MailcapFile(String new_fname)
            throws IOException
The constructor that takes a filename as an argument.

Parameters:
new_fname - The file name of the mailcap file.
Throws:
IOException

MailcapFile

public MailcapFile(InputStream is)
            throws IOException
The constructor that takes an input stream as an argument.

Parameters:
is - the input stream
Throws:
IOException

MailcapFile

public MailcapFile()
Mailcap file default constructor.

Method Detail

getMailcapList

public Map 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 /\* and return that. Return the list of all that hit.


getMailcapFallbackList

public Map 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 /\* and return that. Return the list of all that hit.


getMimeTypes

public String[] getMimeTypes()
Return all the MIME types known to this mailcap file.


getNativeCommands

public String[] getNativeCommands(String mime_type)
Return all the native comands for the given MIME type.


appendToMailcap

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


parseLine

protected void parseLine(String mailcapEntry)
                  throws MailcapParseException,
                         IOException
A routine to parse individual entries in a Mailcap file. Note that this routine does not handle line continuations. They should have been handled prior to calling this routine.

Throws:
MailcapParseException
IOException

reportParseError

protected static void reportParseError(int expectedToken,
                                       int actualToken,
                                       String actualTokenValue)
                                throws MailcapParseException
Throws:
MailcapParseException

reportParseError

protected static void reportParseError(int expectedToken,
                                       int otherExpectedToken,
                                       int actualToken,
                                       String actualTokenValue)
                                throws MailcapParseException
Throws:
MailcapParseException

reportParseError

protected static void reportParseError(int expectedToken,
                                       int otherExpectedToken,
                                       int anotherExpectedToken,
                                       int actualToken,
                                       String actualTokenValue)
                                throws MailcapParseException
Throws:
MailcapParseException

javax.activation API v.1.1 1.1.1-redhat-2

Copyright © 2012 JBoss by Red Hat. All Rights Reserved.