📄 httpconnection.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PRECON_FAILED">HTTP_PRECON_FAILED</A></B></CODE><BR> 412: The precondition given in one or more of the request-header fields evaluated to false when it was tested on the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PROXY_AUTH">HTTP_PROXY_AUTH</A></B></CODE><BR> 407: This code is similar to 401 (Unauthorized), but indicates that the client must first authenticate itself with the proxy.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_REQ_TOO_LONG">HTTP_REQ_TOO_LONG</A></B></CODE><BR> 414: The server is refusing to service the request because the Request-URI is longer than the server is willing to interpret.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_RESET">HTTP_RESET</A></B></CODE><BR> 205: The server has fulfilled the request and the user agent SHOULD reset the document view which caused the request to be sent.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_SEE_OTHER">HTTP_SEE_OTHER</A></B></CODE><BR> 303: The response to the request can be found under a different URI and SHOULD be retrieved using a GET method on that resource.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_TEMP_REDIRECT">HTTP_TEMP_REDIRECT</A></B></CODE><BR> 307: The requested resource resides temporarily under a different URI.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNAUTHORIZED">HTTP_UNAUTHORIZED</A></B></CODE><BR> 401: The request requires user authentication.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNAVAILABLE">HTTP_UNAVAILABLE</A></B></CODE><BR> 503: The server is currently unable to handle the request due to a temporary overloading or maintenance of the server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNSUPPORTED_RANGE">HTTP_UNSUPPORTED_RANGE</A></B></CODE><BR> 416: A server SHOULD return a response with this status code if a request included a Range request-header field , and none of the range-specifier values in this field overlap the current extent of the selected resource, and the request did not include an If-Range request-header field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNSUPPORTED_TYPE">HTTP_UNSUPPORTED_TYPE</A></B></CODE><BR> 415: The server is refusing to service the request because the entity of the request is in a format not supported by the requested resource for the requested method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_USE_PROXY">HTTP_USE_PROXY</A></B></CODE><BR> 305: The requested resource MUST be accessed through the proxy given by the Location field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_VERSION">HTTP_VERSION</A></B></CODE><BR> 505: The server does not support, or refuses to support, the HTTP protocol version that was used in the request message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#POST">POST</A></B></CODE><BR> HTTP Post method.</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== 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> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getDate()">getDate</A></B>()</CODE><BR> Returns the value of the <code>date</code> header field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getExpiration()">getExpiration</A></B>()</CODE><BR> Returns the value of the <code>expires</code> header field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getFile()">getFile</A></B>()</CODE><BR> Returns the file portion of the URL of this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderField(int)">getHeaderField</A></B>(int n)</CODE><BR> Gets a header field value by index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderField(java.lang.String)">getHeaderField</A></B>(String name)</CODE><BR> Returns the value of the named header field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldDate(java.lang.String, long)">getHeaderFieldDate</A></B>(String name, long def)</CODE><BR> Returns the value of the named field parsed as date.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldInt(java.lang.String, int)">getHeaderFieldInt</A></B>(String name, int def)</CODE><BR> Returns the value of the named field parsed as a number.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldKey(int)">getHeaderFieldKey</A></B>(int n)</CODE><BR> Gets a header field key by index.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHost()">getHost</A></B>()</CODE><BR> Returns the host information of the URL of this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> long</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getLastModified()">getLastModified</A></B>()</CODE><BR> Returns the value of the <code>last-modified</code> header field.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getPort()">getPort</A></B>()</CODE><BR> Returns the network port number of the URL for this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getProtocol()">getProtocol</A></B>()</CODE><BR> Returns the protocol name of the URL of this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getQuery()">getQuery</A></B>()</CODE><BR> Returns the query portion of the URL of this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRef()">getRef</A></B>()</CODE><BR> Returns the ref portion of the URL of this <code>HttpConnection</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestMethod()">getRequestMethod</A></B>()</CODE><BR> Get the current request method.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestProperty(java.lang.String)">getRequestProperty</A></B>(String key)</CODE><BR> Returns the value of the named general request property for this connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getResponseCode()">getResponseCode</A></B>()</CODE><BR> Returns the HTTP response status code.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getResponseMessage()">getResponseMessage</A></B>()</CODE><BR> Gets the HTTP response message, if any, returned along with the response code from a server.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getURL()">getURL</A></B>()</CODE><BR> Return a string representation of the URL for this connection.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestMethod(java.lang.String)">setRequestMethod</A></B>(String method)</CODE><BR> Set the method for the URL request, one of: GET POST HEAD are legal, subject to protocol restrictions.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestProperty(java.lang.String, java.lang.String)">setRequestProperty</A></B>(String key, String value)</CODE><BR> Sets the general request property.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.microedition.io.ContentConnection"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.microedition.io.ContentConnection</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>getEncoding, getLength, getType</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.microedition.io.InputConnection"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.microedition.io.InputConnection</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>openDataInputStream, openInputStream</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.microedition.io.Connection"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface javax.microedition.io.Connection</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>close</CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_javax.microedition.io.OutputConnection"><!-- --></A>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -