Subversion Repositories javautils

Rev

Blame | Last modification | View Log | RSS feed

  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!--NewPage-->
  3. <HTML>
  4. <HEAD>
  5. <!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:39 PST 2009 -->
  6. <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  7. <TITLE>
  8. ContentType (JavaMail API documentation)
  9. </TITLE>
  10.  
  11. <META NAME="date" CONTENT="2009-11-17">
  12.  
  13. <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
  14.  
  15. <SCRIPT type="text/javascript">
  16. function windowTitle()
  17. {
  18.     if (location.href.indexOf('is-external=true') == -1) {
  19.         parent.document.title="ContentType (JavaMail API documentation)";
  20.     }
  21. }
  22. </SCRIPT>
  23. <NOSCRIPT>
  24. </NOSCRIPT>
  25.  
  26. </HEAD>
  27.  
  28. <BODY BGCOLOR="white" onload="windowTitle();">
  29. <HR>
  30.  
  31.  
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <A NAME="navbar_top"><!-- --></A>
  34. <A HREF="#skip-navbar_top" title="Skip navigation links"></A>
  35. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  36. <TR>
  37. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  38. <A NAME="navbar_top_firstrow"><!-- --></A>
  39. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  40.   <TR ALIGN="center" VALIGN="top">
  41.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  42.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  43.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  44.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ContentType.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  45.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  46.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  47.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  48.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  49.   </TR>
  50. </TABLE>
  51. </TD>
  52. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  53. </EM>
  54. </TD>
  55. </TR>
  56.  
  57. <TR>
  58. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  59. &nbsp;<A HREF="../../../javax/mail/internet/ContentDisposition.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;
  60. &nbsp;<A HREF="../../../javax/mail/internet/HeaderTokenizer.html" title="class in javax.mail.internet"><B>NEXT CLASS</B></A></FONT></TD>
  61. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  62.   <A HREF="../../../index.html?javax/mail/internet/ContentType.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  63. &nbsp;<A HREF="ContentType.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  64. &nbsp;<SCRIPT type="text/javascript">
  65.   <!--
  66.   if(window==top) {
  67.     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  68.   }
  69.   //-->
  70. </SCRIPT>
  71. <NOSCRIPT>
  72.   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  73. </NOSCRIPT>
  74.  
  75.  
  76. </FONT></TD>
  77. </TR>
  78. <TR>
  79. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  80.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  81. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  82. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  83. </TR>
  84. </TABLE>
  85. <A NAME="skip-navbar_top"></A>
  86. <!-- ========= END OF TOP NAVBAR ========= -->
  87.  
  88. <HR>
  89. <!-- ======== START OF CLASS DATA ======== -->
  90. <H2>
  91. <FONT SIZE="-1">
  92. javax.mail.internet</FONT>
  93. <BR>
  94. Class ContentType</H2>
  95. <PRE>
  96. <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  97.   <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>javax.mail.internet.ContentType</B>
  98. </PRE>
  99. <HR>
  100. <DL>
  101. <DT><PRE>public class <B>ContentType</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
  102. </PRE>
  103.  
  104. <P>
  105. This class represents a MIME ContentType value. It provides
  106.  methods to parse a ContentType string into individual components
  107.  and to generate a MIME style ContentType string.
  108. <P>
  109.  
  110. <P>
  111. <HR>
  112.  
  113. <P>
  114.  
  115. <!-- ======== CONSTRUCTOR SUMMARY ======== -->
  116.  
  117. <A NAME="constructor_summary"><!-- --></A>
  118. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  119. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  120. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  121. <B>Constructor Summary</B></FONT></TH>
  122. </TR>
  123. <TR BGCOLOR="white" CLASS="TableRowColor">
  124. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#ContentType()">ContentType</A></B>()</CODE>
  125.  
  126. <BR>
  127. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No-arg Constructor.</TD>
  128. </TR>
  129. <TR BGCOLOR="white" CLASS="TableRowColor">
  130. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#ContentType(java.lang.String)">ContentType</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
  131.  
  132. <BR>
  133. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor that takes a Content-Type string.</TD>
  134. </TR>
  135. <TR BGCOLOR="white" CLASS="TableRowColor">
  136. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#ContentType(java.lang.String, java.lang.String, javax.mail.internet.ParameterList)">ContentType</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;primaryType,
  137.             <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subType,
  138.             <A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</CODE>
  139.  
  140. <BR>
  141. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
  142. </TR>
  143. </TABLE>
  144. &nbsp;
  145. <!-- ========== METHOD SUMMARY =========== -->
  146.  
  147. <A NAME="method_summary"><!-- --></A>
  148. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  149. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  150. <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
  151. <B>Method Summary</B></FONT></TH>
  152. </TR>
  153. <TR BGCOLOR="white" CLASS="TableRowColor">
  154. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  155. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  156. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#getBaseType()">getBaseType</A></B>()</CODE>
  157.  
  158. <BR>
  159. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the MIME type string, without the parameters.</TD>
  160. </TR>
  161. <TR BGCOLOR="white" CLASS="TableRowColor">
  162. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  163. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  164. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#getParameter(java.lang.String)">getParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</CODE>
  165.  
  166. <BR>
  167. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the specified parameter value.</TD>
  168. </TR>
  169. <TR BGCOLOR="white" CLASS="TableRowColor">
  170. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  171. <CODE>&nbsp;<A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A></CODE></FONT></TD>
  172. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#getParameterList()">getParameterList</A></B>()</CODE>
  173.  
  174. <BR>
  175. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return a ParameterList object that holds all the available
  176.  parameters.</TD>
  177. </TR>
  178. <TR BGCOLOR="white" CLASS="TableRowColor">
  179. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  180. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  181. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#getPrimaryType()">getPrimaryType</A></B>()</CODE>
  182.  
  183. <BR>
  184. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the primary type.</TD>
  185. </TR>
  186. <TR BGCOLOR="white" CLASS="TableRowColor">
  187. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  188. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  189. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#getSubType()">getSubType</A></B>()</CODE>
  190.  
  191. <BR>
  192. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the subType.</TD>
  193. </TR>
  194. <TR BGCOLOR="white" CLASS="TableRowColor">
  195. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  196. <CODE>&nbsp;boolean</CODE></FONT></TD>
  197. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#match(javax.mail.internet.ContentType)">match</A></B>(<A HREF="../../../javax/mail/internet/ContentType.html" title="class in javax.mail.internet">ContentType</A>&nbsp;cType)</CODE>
  198.  
  199. <BR>
  200. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Match with the specified ContentType object.</TD>
  201. </TR>
  202. <TR BGCOLOR="white" CLASS="TableRowColor">
  203. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  204. <CODE>&nbsp;boolean</CODE></FONT></TD>
  205. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#match(java.lang.String)">match</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</CODE>
  206.  
  207. <BR>
  208. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Match with the specified content-type string.</TD>
  209. </TR>
  210. <TR BGCOLOR="white" CLASS="TableRowColor">
  211. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  212. <CODE>&nbsp;void</CODE></FONT></TD>
  213. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#setParameter(java.lang.String, java.lang.String)">setParameter</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  214.              <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;value)</CODE>
  215.  
  216. <BR>
  217. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the specified parameter.</TD>
  218. </TR>
  219. <TR BGCOLOR="white" CLASS="TableRowColor">
  220. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  221. <CODE>&nbsp;void</CODE></FONT></TD>
  222. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#setParameterList(javax.mail.internet.ParameterList)">setParameterList</A></B>(<A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</CODE>
  223.  
  224. <BR>
  225. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set a new ParameterList.</TD>
  226. </TR>
  227. <TR BGCOLOR="white" CLASS="TableRowColor">
  228. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  229. <CODE>&nbsp;void</CODE></FONT></TD>
  230. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#setPrimaryType(java.lang.String)">setPrimaryType</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;primaryType)</CODE>
  231.  
  232. <BR>
  233. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the primary type.</TD>
  234. </TR>
  235. <TR BGCOLOR="white" CLASS="TableRowColor">
  236. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  237. <CODE>&nbsp;void</CODE></FONT></TD>
  238. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#setSubType(java.lang.String)">setSubType</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subType)</CODE>
  239.  
  240. <BR>
  241. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the subType.</TD>
  242. </TR>
  243. <TR BGCOLOR="white" CLASS="TableRowColor">
  244. <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
  245. <CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD>
  246. <TD><CODE><B><A HREF="../../../javax/mail/internet/ContentType.html#toString()">toString</A></B>()</CODE>
  247.  
  248. <BR>
  249. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Retrieve a RFC2045 style string representation of
  250.  this Content-Type.</TD>
  251. </TR>
  252. </TABLE>
  253. &nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
  254. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  255. <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
  256. <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
  257. </TR>
  258. <TR BGCOLOR="white" CLASS="TableRowColor">
  259. <TD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
  260. </TR>
  261. </TABLE>
  262. &nbsp;
  263. <P>
  264.  
  265. <!-- ========= CONSTRUCTOR DETAIL ======== -->
  266.  
  267. <A NAME="constructor_detail"><!-- --></A>
  268. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  269. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  270. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  271. <B>Constructor Detail</B></FONT></TH>
  272. </TR>
  273. </TABLE>
  274.  
  275. <A NAME="ContentType()"><!-- --></A><H3>
  276. ContentType</H3>
  277. <PRE>
  278. public <B>ContentType</B>()</PRE>
  279. <DL>
  280. <DD>No-arg Constructor.
  281. <P>
  282. </DL>
  283. <HR>
  284.  
  285. <A NAME="ContentType(java.lang.String, java.lang.String, javax.mail.internet.ParameterList)"><!-- --></A><H3>
  286. ContentType</H3>
  287. <PRE>
  288. public <B>ContentType</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;primaryType,
  289.                    <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subType,
  290.                    <A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</PRE>
  291. <DL>
  292. <DD>Constructor.
  293. <P>
  294. <DL>
  295. <DT><B>Parameters:</B><DD><CODE>primaryType</CODE> - primary type<DD><CODE>subType</CODE> - subType<DD><CODE>list</CODE> - ParameterList</DL>
  296. </DL>
  297. <HR>
  298.  
  299. <A NAME="ContentType(java.lang.String)"><!-- --></A><H3>
  300. ContentType</H3>
  301. <PRE>
  302. public <B>ContentType</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)
  303.             throws <A HREF="../../../javax/mail/internet/ParseException.html" title="class in javax.mail.internet">ParseException</A></PRE>
  304. <DL>
  305. <DD>Constructor that takes a Content-Type string. The String
  306.  is parsed into its constituents: primaryType, subType
  307.  and parameters. A ParseException is thrown if the parse fails.
  308. <P>
  309. <DL>
  310. <DT><B>Parameters:</B><DD><CODE>s</CODE> - the Content-Type string.
  311. <DT><B>Throws:</B>
  312. <DD><CODE><A HREF="../../../javax/mail/internet/ParseException.html" title="class in javax.mail.internet">ParseException</A></CODE> - if the parse fails.</DL>
  313. </DL>
  314.  
  315. <!-- ============ METHOD DETAIL ========== -->
  316.  
  317. <A NAME="method_detail"><!-- --></A>
  318. <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
  319. <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
  320. <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
  321. <B>Method Detail</B></FONT></TH>
  322. </TR>
  323. </TABLE>
  324.  
  325. <A NAME="getPrimaryType()"><!-- --></A><H3>
  326. getPrimaryType</H3>
  327. <PRE>
  328. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getPrimaryType</B>()</PRE>
  329. <DL>
  330. <DD>Return the primary type.
  331. <P>
  332. <DD><DL>
  333.  
  334. <DT><B>Returns:</B><DD>the primary type</DL>
  335. </DD>
  336. </DL>
  337. <HR>
  338.  
  339. <A NAME="getSubType()"><!-- --></A><H3>
  340. getSubType</H3>
  341. <PRE>
  342. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getSubType</B>()</PRE>
  343. <DL>
  344. <DD>Return the subType.
  345. <P>
  346. <DD><DL>
  347.  
  348. <DT><B>Returns:</B><DD>the subType</DL>
  349. </DD>
  350. </DL>
  351. <HR>
  352.  
  353. <A NAME="getBaseType()"><!-- --></A><H3>
  354. getBaseType</H3>
  355. <PRE>
  356. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getBaseType</B>()</PRE>
  357. <DL>
  358. <DD>Return the MIME type string, without the parameters.
  359.  The returned value is basically the concatenation of
  360.  the primaryType, the '/' character and the secondaryType.
  361. <P>
  362. <DD><DL>
  363.  
  364. <DT><B>Returns:</B><DD>the type</DL>
  365. </DD>
  366. </DL>
  367. <HR>
  368.  
  369. <A NAME="getParameter(java.lang.String)"><!-- --></A><H3>
  370. getParameter</H3>
  371. <PRE>
  372. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getParameter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name)</PRE>
  373. <DL>
  374. <DD>Return the specified parameter value. Returns <code>null</code>
  375.  if this parameter is absent.
  376. <P>
  377. <DD><DL>
  378.  
  379. <DT><B>Returns:</B><DD>parameter value</DL>
  380. </DD>
  381. </DL>
  382. <HR>
  383.  
  384. <A NAME="getParameterList()"><!-- --></A><H3>
  385. getParameterList</H3>
  386. <PRE>
  387. public <A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A> <B>getParameterList</B>()</PRE>
  388. <DL>
  389. <DD>Return a ParameterList object that holds all the available
  390.  parameters. Returns null if no parameters are available.
  391. <P>
  392. <DD><DL>
  393.  
  394. <DT><B>Returns:</B><DD>ParameterList</DL>
  395. </DD>
  396. </DL>
  397. <HR>
  398.  
  399. <A NAME="setPrimaryType(java.lang.String)"><!-- --></A><H3>
  400. setPrimaryType</H3>
  401. <PRE>
  402. public void <B>setPrimaryType</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;primaryType)</PRE>
  403. <DL>
  404. <DD>Set the primary type. Overrides existing primary type.
  405. <P>
  406. <DD><DL>
  407. <DT><B>Parameters:</B><DD><CODE>primaryType</CODE> - primary type</DL>
  408. </DD>
  409. </DL>
  410. <HR>
  411.  
  412. <A NAME="setSubType(java.lang.String)"><!-- --></A><H3>
  413. setSubType</H3>
  414. <PRE>
  415. public void <B>setSubType</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;subType)</PRE>
  416. <DL>
  417. <DD>Set the subType.  Replaces the existing subType.
  418. <P>
  419. <DD><DL>
  420. <DT><B>Parameters:</B><DD><CODE>subType</CODE> - the subType</DL>
  421. </DD>
  422. </DL>
  423. <HR>
  424.  
  425. <A NAME="setParameter(java.lang.String, java.lang.String)"><!-- --></A><H3>
  426. setParameter</H3>
  427. <PRE>
  428. public void <B>setParameter</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;name,
  429.                          <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;value)</PRE>
  430. <DL>
  431. <DD>Set the specified parameter. If this parameter already exists,
  432.  it is replaced by this new value.
  433. <P>
  434. <DD><DL>
  435. <DT><B>Parameters:</B><DD><CODE>name</CODE> - parameter name<DD><CODE>value</CODE> - parameter value</DL>
  436. </DD>
  437. </DL>
  438. <HR>
  439.  
  440. <A NAME="setParameterList(javax.mail.internet.ParameterList)"><!-- --></A><H3>
  441. setParameterList</H3>
  442. <PRE>
  443. public void <B>setParameterList</B>(<A HREF="../../../javax/mail/internet/ParameterList.html" title="class in javax.mail.internet">ParameterList</A>&nbsp;list)</PRE>
  444. <DL>
  445. <DD>Set a new ParameterList.
  446. <P>
  447. <DD><DL>
  448. <DT><B>Parameters:</B><DD><CODE>list</CODE> - ParameterList</DL>
  449. </DD>
  450. </DL>
  451. <HR>
  452.  
  453. <A NAME="toString()"><!-- --></A><H3>
  454. toString</H3>
  455. <PRE>
  456. public <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE>
  457. <DL>
  458. <DD>Retrieve a RFC2045 style string representation of
  459.  this Content-Type. Returns <code>null</code> if
  460.  the conversion failed.
  461. <P>
  462. <DD><DL>
  463. <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></CODE></DL>
  464. </DD>
  465. <DD><DL>
  466.  
  467. <DT><B>Returns:</B><DD>RFC2045 style string</DL>
  468. </DD>
  469. </DL>
  470. <HR>
  471.  
  472. <A NAME="match(javax.mail.internet.ContentType)"><!-- --></A><H3>
  473. match</H3>
  474. <PRE>
  475. public boolean <B>match</B>(<A HREF="../../../javax/mail/internet/ContentType.html" title="class in javax.mail.internet">ContentType</A>&nbsp;cType)</PRE>
  476. <DL>
  477. <DD>Match with the specified ContentType object. This method
  478.  compares <strong>only the <code>primaryType</code> and
  479.  <code>subType</code> </strong>. The parameters of both operands
  480.  are ignored. <p>
  481.  
  482.  For example, this method will return <code>true</code> when
  483.  comparing the ContentTypes for <strong>"text/plain"</strong>
  484.  and <strong>"text/plain; charset=foobar"</strong>.
  485.  
  486.  If the <code>subType</code> of either operand is the special
  487.  character '*', then the subtype is ignored during the match.
  488.  For example, this method will return <code>true</code> when
  489.  comparing the ContentTypes for <strong>"text/plain"</strong>
  490.  and <strong>"text/*" </strong>
  491. <P>
  492. <DD><DL>
  493. <DT><B>Parameters:</B><DD><CODE>cType</CODE> - ContentType to compare this against</DL>
  494. </DD>
  495. </DL>
  496. <HR>
  497.  
  498. <A NAME="match(java.lang.String)"><!-- --></A><H3>
  499. match</H3>
  500. <PRE>
  501. public boolean <B>match</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;s)</PRE>
  502. <DL>
  503. <DD>Match with the specified content-type string. This method
  504.  compares <strong>only the <code>primaryType</code> and
  505.  <code>subType</code> </strong>.
  506.  The parameters of both operands are ignored. <p>
  507.  
  508.  For example, this method will return <code>true</code> when
  509.  comparing the ContentType for <strong>"text/plain"</strong>
  510.  with <strong>"text/plain; charset=foobar"</strong>.
  511.  
  512.  If the <code>subType</code> of either operand is the special
  513.  character '*', then the subtype is ignored during the match.
  514.  For example, this method will return <code>true</code> when
  515.  comparing the ContentType for <strong>"text/plain"</strong>
  516.  with <strong>"text/*" </strong>
  517. <P>
  518. <DD><DL>
  519. </DL>
  520. </DD>
  521. </DL>
  522. <!-- ========= END OF CLASS DATA ========= -->
  523. <HR>
  524.  
  525.  
  526. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  527. <A NAME="navbar_bottom"><!-- --></A>
  528. <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
  529. <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
  530. <TR>
  531. <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
  532. <A NAME="navbar_bottom_firstrow"><!-- --></A>
  533. <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  534.   <TR ALIGN="center" VALIGN="top">
  535.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  536.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  537.   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  538.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ContentType.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
  539.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  540.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  541.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  542.   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  543.   </TR>
  544. </TABLE>
  545. </TD>
  546. <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
  547. </EM>
  548. </TD>
  549. </TR>
  550.  
  551. <TR>
  552. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  553. &nbsp;<A HREF="../../../javax/mail/internet/ContentDisposition.html" title="class in javax.mail.internet"><B>PREV CLASS</B></A>&nbsp;
  554. &nbsp;<A HREF="../../../javax/mail/internet/HeaderTokenizer.html" title="class in javax.mail.internet"><B>NEXT CLASS</B></A></FONT></TD>
  555. <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  556.   <A HREF="../../../index.html?javax/mail/internet/ContentType.html" target="_top"><B>FRAMES</B></A>  &nbsp;
  557. &nbsp;<A HREF="ContentType.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
  558. &nbsp;<SCRIPT type="text/javascript">
  559.   <!--
  560.   if(window==top) {
  561.     document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
  562.   }
  563.   //-->
  564. </SCRIPT>
  565. <NOSCRIPT>
  566.   <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
  567. </NOSCRIPT>
  568.  
  569.  
  570. </FONT></TD>
  571. </TR>
  572. <TR>
  573. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  574.   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
  575. <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  576. DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
  577. </TR>
  578. </TABLE>
  579. <A NAME="skip-navbar_bottom"></A>
  580. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  581.  
  582. <HR>
  583. Copyright &#169; 2009 <a href="http://www.sun.com">Sun Microsystems, Inc.</a>. All Rights Reserved.
  584. </BODY>
  585. </HTML>
  586.