| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.5.0_22) on Tue Sep 18 20:44:14 GMT+01:00 2012 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| ContentType (HttpComponents Core 4.2.2 API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.apache.http.entity.ContentType class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="ContentType (HttpComponents Core 4.2.2 API)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContentType.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/entity/ContentProducer.html" title="interface in org.apache.http.entity"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/entity/EntityTemplate.html" title="class in org.apache.http.entity"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/entity/ContentType.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ContentType.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.http.entity</FONT> |
| <BR> |
| Class ContentType</H2> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.entity.ContentType</B> |
| </PRE> |
| <DL> |
| <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DD> |
| </DL> |
| <HR> |
| <DL> |
| <DT><PRE><FONT SIZE="-1"><A HREF="../../../../org/apache/http/annotation/Immutable.html" title="annotation in org.apache.http.annotation">@Immutable</A> |
| </FONT>public final class <B>ContentType</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/io/Serializable.html" title="class or interface in java.io">Serializable</A></DL> |
| </PRE> |
| |
| <P> |
| Content type information consisting of a MIME type and an optional charset. |
| <p/> |
| This class makes no attempts to verify validity of the MIME type. |
| The input parameters of the <A HREF="../../../../org/apache/http/entity/ContentType.html#create(java.lang.String, java.lang.String)"><CODE>create(String, String)</CODE></A> method, however, may not |
| contain characters <">, <;>, <,> reserved by the HTTP specification. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>4.2</DD> |
| <DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#org.apache.http.entity.ContentType">Serialized Form</A></DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_ATOM_XML">APPLICATION_ATOM_XML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_FORM_URLENCODED">APPLICATION_FORM_URLENCODED</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_JSON">APPLICATION_JSON</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_OCTET_STREAM">APPLICATION_OCTET_STREAM</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_SVG_XML">APPLICATION_SVG_XML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_XHTML_XML">APPLICATION_XHTML_XML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#APPLICATION_XML">APPLICATION_XML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#DEFAULT_BINARY">DEFAULT_BINARY</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#DEFAULT_TEXT">DEFAULT_TEXT</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#MULTIPART_FORM_DATA">MULTIPART_FORM_DATA</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#TEXT_HTML">TEXT_HTML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#TEXT_PLAIN">TEXT_PLAIN</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#TEXT_XML">TEXT_XML</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#WILDCARD">WILDCARD</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#create(java.lang.String)">create</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType)</CODE> |
| |
| <BR> |
| Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A> without a charset.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#create(java.lang.String, java.nio.charset.Charset)">create</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A> charset)</CODE> |
| |
| <BR> |
| Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#create(java.lang.String, java.lang.String)">create</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset)</CODE> |
| |
| <BR> |
| Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A>.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#get(org.apache.http.HttpEntity)">get</A></B>(<A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http">HttpEntity</A> entity)</CODE> |
| |
| <BR> |
| Extracts <code>Content-Type</code> value from <A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http"><CODE>HttpEntity</CODE></A> exactly as |
| specified by the <code>Content-Type</code> header of the entity.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#getCharset()">getCharset</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#getMimeType()">getMimeType</A></B>()</CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#getOrDefault(org.apache.http.HttpEntity)">getOrDefault</A></B>(<A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http">HttpEntity</A> entity)</CODE> |
| |
| <BR> |
| Extracts <code>Content-Type</code> value from <A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http"><CODE>HttpEntity</CODE></A> or returns default value |
| if not explicitly specified.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#parse(java.lang.String)">parse</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s)</CODE> |
| |
| <BR> |
| Parses textual representation of <code>Content-Type</code> value.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE> <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../org/apache/http/entity/ContentType.html#toString()">toString</A></B>()</CODE> |
| |
| <BR> |
| Converts a ContentType to a string which can be used as a ContentType header.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="APPLICATION_ATOM_XML"><!-- --></A><H3> |
| APPLICATION_ATOM_XML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_ATOM_XML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_FORM_URLENCODED"><!-- --></A><H3> |
| APPLICATION_FORM_URLENCODED</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_FORM_URLENCODED</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_JSON"><!-- --></A><H3> |
| APPLICATION_JSON</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_JSON</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_OCTET_STREAM"><!-- --></A><H3> |
| APPLICATION_OCTET_STREAM</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_OCTET_STREAM</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_SVG_XML"><!-- --></A><H3> |
| APPLICATION_SVG_XML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_SVG_XML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_XHTML_XML"><!-- --></A><H3> |
| APPLICATION_XHTML_XML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_XHTML_XML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="APPLICATION_XML"><!-- --></A><H3> |
| APPLICATION_XML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>APPLICATION_XML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="MULTIPART_FORM_DATA"><!-- --></A><H3> |
| MULTIPART_FORM_DATA</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>MULTIPART_FORM_DATA</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="TEXT_HTML"><!-- --></A><H3> |
| TEXT_HTML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>TEXT_HTML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="TEXT_PLAIN"><!-- --></A><H3> |
| TEXT_PLAIN</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>TEXT_PLAIN</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="TEXT_XML"><!-- --></A><H3> |
| TEXT_XML</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>TEXT_XML</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="WILDCARD"><!-- --></A><H3> |
| WILDCARD</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>WILDCARD</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="DEFAULT_TEXT"><!-- --></A><H3> |
| DEFAULT_TEXT</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>DEFAULT_TEXT</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| <HR> |
| |
| <A NAME="DEFAULT_BINARY"><!-- --></A><H3> |
| DEFAULT_BINARY</H3> |
| <PRE> |
| public static final <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>DEFAULT_BINARY</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="getMimeType()"><!-- --></A><H3> |
| getMimeType</H3> |
| <PRE> |
| public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getMimeType</B>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getCharset()"><!-- --></A><H3> |
| getCharset</H3> |
| <PRE> |
| public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A> <B>getCharset</B>()</PRE> |
| <DL> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="toString()"><!-- --></A><H3> |
| toString</H3> |
| <PRE> |
| public <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE> |
| <DL> |
| <DD>Converts a ContentType to a string which can be used as a ContentType header. |
| If a charset is provided by the ContentType, it will be included in the string. |
| <P> |
| <DD><DL> |
| <DT><B>Overrides:</B><DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A></CODE> in class <CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></CODE></DL> |
| </DD> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="create(java.lang.String, java.nio.charset.Charset)"><!-- --></A><H3> |
| create</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>create</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A> charset)</PRE> |
| <DL> |
| <DD>Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mimeType</CODE> - MIME type. It may not be <code>null</code> or empty. It may not contain |
| characters <">, <;>, <,> reserved by the HTTP specification.<DD><CODE>charset</CODE> - charset. |
| <DT><B>Returns:</B><DD>content type</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="create(java.lang.String)"><!-- --></A><H3> |
| create</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>create</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType)</PRE> |
| <DL> |
| <DD>Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A> without a charset. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mimeType</CODE> - MIME type. It may not be <code>null</code> or empty. It may not contain |
| characters <">, <;>, <,> reserved by the HTTP specification. |
| <DT><B>Returns:</B><DD>content type</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="create(java.lang.String, java.lang.String)"><!-- --></A><H3> |
| create</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>create</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> mimeType, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> charset) |
| throws <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></PRE> |
| <DL> |
| <DD>Creates a new instance of <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity"><CODE>ContentType</CODE></A>. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>mimeType</CODE> - MIME type. It may not be <code>null</code> or empty. It may not contain |
| characters <">, <;>, <,> reserved by the HTTP specification.<DD><CODE>charset</CODE> - charset. It may not contain characters <">, <;>, <,> reserved by the HTTP |
| specification. This parameter is optional. |
| <DT><B>Returns:</B><DD>content type |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parse(java.lang.String)"><!-- --></A><H3> |
| parse</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>parse</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> s) |
| throws <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A>, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></PRE> |
| <DL> |
| <DD>Parses textual representation of <code>Content-Type</code> value. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>s</CODE> - text |
| <DT><B>Returns:</B><DD>content type |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if the given text does not represent a valid |
| <code>Content-Type</code> value. |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="get(org.apache.http.HttpEntity)"><!-- --></A><H3> |
| get</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>get</B>(<A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http">HttpEntity</A> entity) |
| throws <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A>, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></PRE> |
| <DL> |
| <DD>Extracts <code>Content-Type</code> value from <A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http"><CODE>HttpEntity</CODE></A> exactly as |
| specified by the <code>Content-Type</code> header of the entity. Returns <code>null</code> |
| if not specified. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>entity</CODE> - HTTP entity |
| <DT><B>Returns:</B><DD>content type |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if the given text does not represent a valid |
| <code>Content-Type</code> value. |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/nio/charset/UnsupportedCharsetException.html" title="class or interface in java.nio.charset">UnsupportedCharsetException</A></CODE></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="getOrDefault(org.apache.http.HttpEntity)"><!-- --></A><H3> |
| getOrDefault</H3> |
| <PRE> |
| public static <A HREF="../../../../org/apache/http/entity/ContentType.html" title="class in org.apache.http.entity">ContentType</A> <B>getOrDefault</B>(<A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http">HttpEntity</A> entity) |
| throws <A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></PRE> |
| <DL> |
| <DD>Extracts <code>Content-Type</code> value from <A HREF="../../../../org/apache/http/HttpEntity.html" title="interface in org.apache.http"><CODE>HttpEntity</CODE></A> or returns default value |
| if not explicitly specified. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>entity</CODE> - HTTP entity |
| <DT><B>Returns:</B><DD>content type |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../org/apache/http/ParseException.html" title="class in org.apache.http">ParseException</A></CODE> - if the given text does not represent a valid |
| <code>Content-Type</code> value.</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=2 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> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ContentType.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| </TR> |
| </TABLE> |
| </TD> |
| <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| </EM> |
| </TD> |
| </TR> |
| |
| <TR> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../org/apache/http/entity/ContentProducer.html" title="interface in org.apache.http.entity"><B>PREV CLASS</B></A> |
| <A HREF="../../../../org/apache/http/entity/EntityTemplate.html" title="class in org.apache.http.entity"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../index.html?org/apache/http/entity/ContentType.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="ContentType.html" target="_top"><B>NO FRAMES</B></A> |
| <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: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 2005-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |