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

📄 contenttype.html

📁 j2ee的API 1.4版本,j2ee的帮助文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<PRE>public <B>ContentType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;primaryType,                   <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;subType,                   <A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</PRE><DL><DD>Constructor.<P><DT><B>Parameters:</B><DD><CODE>primaryType</CODE> - primary type<DD><CODE>subType</CODE> - subType<DD><CODE>list</CODE> - ParameterList</DL><HR><A NAME="ContentType(java.lang.String)"><!-- --></A><H3>ContentType</H3><PRE>public <B>ContentType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;s)            throws <A HREF="../../../javax/mail/internet/ParseException.html" title="class in javax.mail.internet">ParseException</A></PRE><DL><DD>Constructor that takes a Content-Type string. The String is parsed into its constituents: primaryType, subType and parameters. A ParseException is thrown if the parse fails.<P><DT><B>Parameters:</B><DD><CODE>s</CODE> - the Content-Type string.<DT><B>Throws:</B><DD><CODE><A HREF="../../../javax/mail/internet/ParseException.html" title="class in javax.mail.internet">ParseException</A></CODE> - if the parse fails.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getPrimaryType()"><!-- --></A><H3>getPrimaryType</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPrimaryType</B>()</PRE><DL><DD>Return the primary type.<P><DD><DL><DT><B>Returns:</B><DD>the primary type</DL></DD></DL><HR><A NAME="getSubType()"><!-- --></A><H3>getSubType</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getSubType</B>()</PRE><DL><DD>Return the subType.<P><DD><DL><DT><B>Returns:</B><DD>the subType</DL></DD></DL><HR><A NAME="getBaseType()"><!-- --></A><H3>getBaseType</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getBaseType</B>()</PRE><DL><DD>Return the MIME type string, without the parameters. The returned value is basically the concatenation of the primaryType, the '/' character and the secondaryType.<P><DD><DL><DT><B>Returns:</B><DD>the type</DL></DD></DL><HR><A NAME="getParameter(java.lang.String)"><!-- --></A><H3>getParameter</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getParameter</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Return the specified parameter value. Returns <code>null</code> if this parameter is absent.<P><DD><DL><DT><B>Returns:</B><DD>parameter value</DL></DD></DL><HR><A NAME="getParameterList()"><!-- --></A><H3>getParameterList</H3><PRE>public <A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A> <B>getParameterList</B>()</PRE><DL><DD>Return a ParameterList object that holds all the available  parameters. Returns null if no parameters are available.<P><DD><DL><DT><B>Returns:</B><DD>ParameterList</DL></DD></DL><HR><A NAME="setPrimaryType(java.lang.String)"><!-- --></A><H3>setPrimaryType</H3><PRE>public void <B>setPrimaryType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;primaryType)</PRE><DL><DD>Set the primary type. Overrides existing primary type.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>primaryType</CODE> - primary type</DL></DD></DL><HR><A NAME="setSubType(java.lang.String)"><!-- --></A><H3>setSubType</H3><PRE>public void <B>setSubType</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;subType)</PRE><DL><DD>Set the subType.  Replaces the existing subType.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>subType</CODE> - the subType</DL></DD></DL><HR><A NAME="setParameter(java.lang.String, java.lang.String)"><!-- --></A><H3>setParameter</H3><PRE>public void <B>setParameter</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,                         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;value)</PRE><DL><DD>Set the specified parameter. If this parameter already exists, it is replaced by this new value.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - parameter name<DD><CODE>value</CODE> - parameter value</DL></DD></DL><HR><A NAME="setParameterList(javax.mail.internet.ParameterList)"><!-- --></A><H3>setParameterList</H3><PRE>public void <B>setParameterList</B>(<A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</PRE><DL><DD>Set a new ParameterList.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>list</CODE> - ParameterList</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE><DL><DD>Retrieve a RFC2045 style string representation of this Content-Type. Returns <code>null</code> if the conversion failed.<P><DD><DL><DT><B>Returns:</B><DD>RFC2045 style string</DL></DD></DL><HR><A NAME="match(javax.mail.internet.ContentType)"><!-- --></A><H3>match</H3><PRE>public boolean <B>match</B>(<A HREF="../../../javax/mail/internet/ContentType.html" title="class in javax.mail.internet">ContentType</A>&nbsp;cType)</PRE><DL><DD>Match with the specified ContentType object. This method compares <strong>only the <code>primaryType</code> and  <code>subType</code> </strong>. The parameters of both operands are ignored. <p> For example, this method will return <code>true</code> when comparing the ContentTypes for <strong>"text/plain"</strong> and <strong>"text/plain; charset=foobar"</strong>. If the <code>subType</code> of either operand is the special character '*', then the subtype is ignored during the match.  For example, this method will return <code>true</code> when  comparing the ContentTypes for <strong>"text/plain"</strong>  and <strong>"text/*" </strong><P><DD><DL><DT><B>Parameters:</B><DD><CODE>cType</CODE> - ContentType to compare this against</DL></DD></DL><HR><A NAME="match(java.lang.String)"><!-- --></A><H3>match</H3><PRE>public boolean <B>match</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;s)</PRE><DL><DD>Match with the specified content-type string. This method compares <strong>only the <code>primaryType</code> and  <code>subType</code> </strong>. The parameters of both operands are ignored. <p> For example, this method will return <code>true</code> when comparing the ContentType for <strong>"text/plain"</strong> with <strong>"text/plain; charset=foobar"</strong>. If the <code>subType</code> of either operand is the special  character '*', then the subtype is ignored during the match.  For example, this method will return <code>true</code> when  comparing the ContentType for <strong>"text/plain"</strong>  with <strong>"text/*" </strong><P><DD><DL></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/mail/internet/ContentDisposition.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/mail/internet/HeaderTokenizer.html" title="class in javax.mail.internet"><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="ContentType.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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