⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mailcapcommandmap.html

📁 SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc on Thu Jan 17 03:51:30 PST 2002 -->
<TITLE>
Java 2 Platform EE v1.3: Class  MailcapCommandMap
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../javax/activation/FileTypeMap.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../javax/activation/MimeType.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="MailcapCommandMap.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
javax.activation</FONT>
<BR>
Class  MailcapCommandMap</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../javax/activation/CommandMap.html">javax.activation.CommandMap</A>
        |
        +--<B>javax.activation.MailcapCommandMap</B>
</PRE>
<HR>
<DL>
<DT>public class <B>MailcapCommandMap</B><DT>extends <A HREF="../../javax/activation/CommandMap.html">CommandMap</A></DL>

<P>
MailcapCommandMap extends the CommandMap
 abstract class. It implements a CommandMap whose configuration
 is based on mailcap files (RFC 1524). The MailcapCommandMap can
 be configured both programmatically and via configuration
 files.
 <p>
 <b>Mailcap file search order:</b><p>
 The MailcapCommandMap looks in various places in the user's
 system for mailcap file entries. When requests are made
 to search for commands in the MailcapCommandMap, it searches  
 mailcap files in the following order:
 <p>
 <ol>
 <li> Programatically added entries to the MailcapCommandMap instance.
 <li> The file <code>.mailcap</code> in the user's home directory.
 <li> The file &lt;<i>java.home</i>&gt;<code>/lib/mailcap</code>.
 <li> The file or resource named <code>META-INF/mailcap</code>.
 <li> The file or resource named <code>META-INF/mailcap.default</code>
 (usually found only in the <code>activation.jar</code> file).
 </ol>
 <p>
 <b>Mailcap file format:</b><p>

 Mailcap files must conform to the mailcap
 file specification (RFC 1524, <i>A User Agent Configuration Mechanism
 For Multimedia Mail Format Information</i>). 
 The file format consists of entries corresponding to
 particular MIME types. In general, the specification 
 specifies <i>applications</i> for clients to use when they
 themselves cannot operate on the specified MIME type. The 
 MailcapCommandMap extends this specification by using a parameter mechanism
 in mailcap files that allows JavaBeans(tm) components to be specified as
 corresponding to particular commands for a MIME type.<p>

 When a mailcap file is
 parsed, the MailcapCommandMap recognizes certain parameter signatures,
 specifically those parameter names that begin with <code>x-java-</code>.
 The MailcapCommandMap uses this signature to find
 command entries for inclusion into its registries.
 Parameter names with the form <code>x-java-&lt;name></code>
 are read by the MailcapCommandMap as identifying a command
 with the name <i>name</i>. When the <i>name</i> is <code>
 content-handler</code> the MailcapCommandMap recognizes the class
 signified by this parameter as a <i>DataContentHandler</i>.
 All other commands are handled generically regardless of command 
 name. The command implementation is specified by a fully qualified
 class name of a JavaBean(tm) component. For example; a command for viewing
 some data can be specified as: <code>x-java-view=com.foo.ViewBean</code>.<p>
 
 MailcapCommandMap aware mailcap files have the 
 following general form:<p>
 <code>
 # Comments begin with a '#' and continue to the end of the line.<br>
 &lt;mime type>; ; &lt;parameter list><br>
 # Where a parameter list consists of one or more parameters,<br>
 # where parameters look like: x-java-view=com.sun.TextViewer<br>
 # and a parameter list looks like: <br>
 text/plain; ; x-java-view=com.sun.TextViewer; x-java-edit=com.sun.TextEdit
 <br>
 # Note that mailcap entries that do not contain 'x-java' parameters<br>
 # and comply to RFC 1524 are simply ignored:<br>
 image/gif; /usr/dt/bin/sdtimage %s<br>

 </code>
 <p>
<P>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->


<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#MailcapCommandMap()">MailcapCommandMap</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The default Constructor.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#MailcapCommandMap(java.io.InputStream)">MailcapCommandMap</A></B>(java.io.InputStream&nbsp;is)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that allows the caller to specify an <i>InputStream</i>
 containing a mailcap file.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#MailcapCommandMap(java.lang.String)">MailcapCommandMap</A></B>(java.lang.String&nbsp;fileName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that allows the caller to specify the path
 of a <i>mailcap</i> file.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#addMailcap(java.lang.String)">addMailcap</A></B>(java.lang.String&nbsp;mail_cap)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add entries to the registry.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../javax/activation/DataContentHandler.html">DataContentHandler</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#createDataContentHandler(java.lang.String)">createDataContentHandler</A></B>(java.lang.String&nbsp;mimeType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the DataContentHandler for the specified MIME type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../javax/activation/CommandInfo.html">CommandInfo</A>[]</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#getAllCommands(java.lang.String)">getAllCommands</A></B>(java.lang.String&nbsp;mimeType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get all the available commands in all mailcap files known to
 this instance of MailcapCommandMap for this MIME type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../javax/activation/CommandInfo.html">CommandInfo</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../javax/activation/MailcapCommandMap.html#getCommand(java.lang.String, java.lang.String)">getCommand</A></B>(java.lang.String&nbsp;mimeType,
           java.lang.String&nbsp;cmdName)</CODE>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -