public class MailcapFile extends Object
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
void |
appendToMailcap(String mail_cap)
appendToMailcap: Append to this Mailcap DB, use the mailcap
format:
Comment == "# comment string
Entry == "mimetype; javabeanclass
|
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) |
public MailcapFile(String new_fname) throws IOException
new_fname
- The file name of the mailcap file.IOException
public MailcapFile(InputStream is) throws IOException
is
- the input streamIOException
public MailcapFile()
public Map getMailcapList(String mime_type)
Semantics: First check for the literal mime type,
if that fails looks for wildcard
public Map getMailcapFallbackList(String mime_type)
Semantics: First check for the literal mime type,
if that fails looks for wildcard
public String[] getMimeTypes()
public String[] getNativeCommands(String mime_type)
public void appendToMailcap(String mail_cap)
protected void parseLine(String mailcapEntry) throws MailcapParseException, IOException
MailcapParseException
IOException
protected static void reportParseError(int expectedToken, int actualToken, String actualTokenValue) throws MailcapParseException
MailcapParseException
protected static void reportParseError(int expectedToken, int otherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException
MailcapParseException
protected static void reportParseError(int expectedToken, int otherExpectedToken, int anotherExpectedToken, int actualToken, String actualTokenValue) throws MailcapParseException
MailcapParseException
Copyright © 2017 JBoss by Red Hat. All rights reserved.