<!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.4.2_03) on Mon Oct 10 16:31:47 CEST 2005 -->
<TITLE>
HttpConnection (IM Profile)
</TITLE>

<META NAME="keywords" CONTENT="javax.microedition.io.HttpConnection interface">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    parent.document.title="HttpConnection (IM Profile)";
}
</SCRIPT>

</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=3 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>&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="class-use/HttpConnection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/io/DatagramConnection.html" title="interface in javax.microedition.io"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/io/HttpsConnection.html" title="interface in javax.microedition.io"><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="HttpConnection.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<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">
javax.microedition.io</FONT>
<BR>
Interface HttpConnection</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../javax/microedition/io/Connection.html" title="interface in javax.microedition.io">Connection</A>, <A HREF="../../../javax/microedition/io/ContentConnection.html" title="interface in javax.microedition.io">ContentConnection</A>, <A HREF="../../../javax/microedition/io/InputConnection.html" title="interface in javax.microedition.io">InputConnection</A>, <A HREF="../../../javax/microedition/io/OutputConnection.html" title="interface in javax.microedition.io">OutputConnection</A>, <A HREF="../../../javax/microedition/io/StreamConnection.html" title="interface in javax.microedition.io">StreamConnection</A></DD>
</DL>
<DL>
<DT><B>All Known Subinterfaces:</B> <DD><A HREF="../../../javax/microedition/io/HttpsConnection.html" title="interface in javax.microedition.io">HttpsConnection</A></DD>
</DL>
<HR>
<DL>
<DT>public interface <B>HttpConnection</B><DT>extends <A HREF="../../../javax/microedition/io/ContentConnection.html" title="interface in javax.microedition.io">ContentConnection</A></DL>

<P>
This interface defines the necessary methods and constants
 for an HTTP connection.
 <P>
 HTTP is a request-response protocol in which the parameters of
 request must be set before the request is sent.
 The connection exists in one of three states:
 <UL>
 <LI> Setup, in which the request parameters can be set
 <LI> Connected, in which request parameters have been sent and the
      response is expected
 <LI> Closed, the final state, in which the HTTP connection as been
 terminated
 </UL>
 The following methods may be invoked only in the Setup state:
 <UL>
 <LI> <CODE> setRequestMethod</CODE>
 <LI> <CODE> setRequestProperty</CODE>
 </UL>

 The transition from Setup to Connected is caused by any method that
 requires data to be sent to or received from the server. <p>

 The following methods cause the transition to the Connected state when
 the connection is in Setup state.
 <UL>
 <LI> <CODE> openInputStream</CODE>
 <LI> <CODE> openDataInputStream</CODE>
 <LI> <CODE> getLength</CODE>
 <LI> <CODE> getType</CODE>
 <LI> <CODE> getEncoding</CODE>
 <LI> <CODE> getHeaderField</CODE>
 <LI> <CODE> getResponseCode</CODE>
 <LI> <CODE> getResponseMessage</CODE>
 <LI> <CODE> getHeaderFieldInt</CODE>
 <LI> <CODE> getHeaderFieldDate</CODE>
 <LI> <CODE> getExpiration</CODE>
 <LI> <CODE> getDate</CODE>
 <LI> <CODE> getLastModified</CODE>
 <LI> <CODE> getHeaderField</CODE>
 <LI> <CODE> getHeaderFieldKey</CODE>
 </UL>
 <P>
 The following methods may be invoked while the connection is in Setup or
 Connected state.
 <UL>
 <LI> <CODE> close</CODE>
 <LI> <CODE> getRequestMethod</CODE>
 <LI> <CODE> getRequestProperty</CODE>
 <LI> <CODE> getURL</CODE>
 <LI> <CODE> getProtocol</CODE>
 <LI> <CODE> getHost</CODE>
 <LI> <CODE> getFile</CODE>
 <LI> <CODE> getRef</CODE>
 <LI> <CODE> getPort</CODE>
 <LI> <CODE> getQuery</CODE>
 </UL>

 <P>
 After an output stream has been opened by the
 <code>openOutputStream</code> or <code>openDataOutputStream</code>
 methods, attempts to change the request parameters via
 <code>setRequestMethod</code> or the <code>setRequestProperty</code>
 are ignored. Once the request parameters have been sent,
 these methods will throw an <code>IOException</code>.

 When an output stream is closed via the
 <code>OutputStream.close</code> or <code>DataOutputStream.close</code>
 methods, the connection enters the Connected state.
 When the output stream is flushed via the  
 <code>OutputStream.flush</code> or <code>DataOutputStream.flush</code>
 methods, the request parameters MUST be sent along with any data
 written to the stream.
 </P>

 The transition to Closed state from any other state is caused by the
 <code>close</code> method and the closing all of the streams that were
 opened from the connection. 
 <P>
 <STRONG>Example using StreamConnection</STRONG>
 <p>
 Simple read of a URL using <code>StreamConnection</code>.
 No HTTP specific behavior is needed or used.
 (<strong>Note:</strong> this example ignores all HTTP response
 headers and the HTTP response code. Since a proxy or server
 may have sent an error response page, an application
 can not distinquish which data is retreived in
 the <code>InputStream</code>.)

 <p>
 <code>Connector.open</code> is used to open URL and a
 <code>StreamConnection</code> is returned.
 From the <code>StreamConnection</code> the
 <code>InputStream</code> is opened.
 It is used to read every character until end of file (-1).
 If an exception is thrown the connection and stream are closed.
 <p>
 <pre>
     void getViaStreamConnection(String url) throws IOException {
         StreamConnection c = null;
         InputStream s = null;
         try {
             c = (StreamConnection)Connector.open(url);
             s = c.openInputStream();
             int ch;
             while ((ch = s.read()) != -1) {
                 ...
             }
         } finally {
             if (s != null)
                 s.close();
             if (c != null)
                 c.close();
         }
     }
 </pre>

 </P>
 Optional Connector.open parameters are:
 </P>
 See <a href="SocketConnection.html">SocketConnection</a>. 

 <p>
 <STRONG>Example using ContentConnection</STRONG>
 <p>
 Simple read of a URL using <code>ContentConnection</code>.
 No HTTP specific behavior is needed or used.
 <p>
 <code>Connector.open</code> is used to open url and
 a <code>ContentConnection</code> is returned.
 The <code>ContentConnection</code> may be able to provide the length.
 If the length is available, it is used to read the data in bulk.
 From the <code>ContentConnection</code> the
 <code>InputStream</code> is opened.
 It is used to read every character until end of file (-1).
 If an exception is thrown the connection and stream are closed.
 <p>
 <pre>
     void getViaContentConnection(String url) throws IOException {
         ContentConnection c = null;
         DataInputStream is = null;
         try {
             c = (ContentConnection)Connector.open(url);
             int len = (int)c.getLength();
             dis = c.openDataInputStream();
             if (len &gt; 0) {
                 byte[] data = new byte[len];
                 dis.readFully(data);
             } else {
                 int ch;
                 while ((ch = dis.read()) != -1) {
                     ...
                 }
             }
         } finally {
             if (dis != null)
                 dis.close();
             if (c != null)
                 c.close();
         }
     }
 </pre>
 <p>
 <STRONG>Example using HttpConnection</STRONG>
 <p>
 Read the HTTP headers and the data using <code>HttpConnection</code>.
 <p>
 <code>Connector.open</code> is used to open url and a
 <code>HttpConnection</code> is returned.
 The HTTP headers are read and processed.
 If the length is available, it is used to read the data in bulk.
 From the <code>HttpConnection</code> the
 <code>InputStream</code> is opened.
 It is used to read every character until end of file (-1).
 If an exception is thrown the connection and stream are closed.
 <p>
 <pre>
     void getViaHttpConnection(String url) throws IOException {
         HttpConnection c = null;
         InputStream is = null;
         int rc;

         try {
             c = (HttpConnection)Connector.open(url);

             // Getting the response code will open the connection,
             // send the request, and read the HTTP response headers.
             // The headers are stored until requested.
             rc = c.getResponseCode();
             if (rc != HttpConnection.HTTP_OK) {
                 throw new IOException("HTTP response code: " + rc);
             }

             is = c.openInputStream();

             // Get the ContentType
             String type = c.getType();

             // Get the length and process the data
             int len = (int)c.getLength();
             if (len &gt; 0) {
                 int actual = 0;
                 int bytesread = 0 ;
                 byte[] data = new byte[len];
                 while ((bytesread != len) && (actual != -1)) {
                    actual = is.read(data, bytesread, len - bytesread);
                    bytesread += actual;
                 }
             } else {
                 int ch;
                 while ((ch = is.read()) != -1) {
                     ...
                 }
             }
         } catch (ClassCastException e) {
             throw new IllegalArgumentException("Not an HTTP URL");
         } finally {
             if (is != null)
                 is.close();
             if (c != null)
                 c.close();
         }
     }
 </pre>
 <p>
 <STRONG>Example using POST with HttpConnection</STRONG>
 <p>

 Post a request with some headers and content to the server and
 process the headers and content.
 <p>
 <code>Connector.open</code> is used to open url and a
 <code>HttpConnection</code> is returned.
 The request method is set to POST and request headers set.
 A simple command is written and flushed.
 The HTTP headers are read and processed.
 If the length is available, it is used to read the data in bulk.
 From the <code>HttpConnection</code> the
 <code>InputStream</code> is opened.
 It is used to read every character until end of file (-1).
 If an exception is thrown the connection and stream is closed.
 <p>
 <pre>
    void postViaHttpConnection(String url) throws IOException {
        HttpConnection c = null;
        InputStream is = null;
        OutputStream os = null;
        int rc;

        try {
            c = (HttpConnection)Connector.open(url);

            // Set the request method and headers
            c.setRequestMethod(HttpConnection.POST);
            c.setRequestProperty("If-Modified-Since",
                "29 Oct 1999 19:43:31 GMT");
            c.setRequestProperty("User-Agent",
                "Profile/MIDP-2.0 Configuration/CLDC-1.0");
            c.setRequestProperty("Content-Language", "en-US");

            // Getting the output stream may flush the headers
            os = c.openOutputStream();
            os.write("LIST games\n".getBytes());
            os.flush();           // Optional, getResponseCode will flush

            // Getting the response code will open the connection,
            // send the request, and read the HTTP response headers.
            // The headers are stored until requested.
            rc = c.getResponseCode();
            if (rc != HttpConnection.HTTP_OK) {
                throw new IOException("HTTP response code: " + rc);
            }

            is = c.openInputStream();

            // Get the ContentType
            String type = c.getType();
            processType(type);

            // Get the length and process the data
            int len = (int)c.getLength();
            if (len &gt; 0) {
                 int actual = 0;
                 int bytesread = 0 ;
                 byte[] data = new byte[len];
                 while ((bytesread != len) && (actual != -1)) {
                    actual = is.read(data, bytesread, len - bytesread);
                    bytesread += actual;
                 }
                process(data);
            } else {
                int ch;
                while ((ch = is.read()) != -1) {
                    process((byte)ch);
                }
            }
        } catch (ClassCastException e) {
            throw new IllegalArgumentException("Not an HTTP URL");
        } finally {
            if (is != null)
                is.close();
            if (os != null)
                os.close();
            if (c != null)
                c.close();
        }
    }
 </pre>
 <hr>
 <p>
 <STRONG>Simplified Stream Methods on Connector</STRONG>
 <p>
 Please note the following: The
 <code>Connector</code> class defines the following
 convenience methods for retrieving an input or output stream directly
 for a specified URL:

 <UL>
 <LI> <CODE> InputStream openInputStream(String url) </CODE>
 <LI> <CODE> DataInputStream openDataInputStream(String url) </CODE>
 <LI> <CODE> OutputStream openOutputStream(String url) </CODE>
 <LI> <CODE> DataOutputStream openDataOutputStream(String url) </CODE>
 </UL>

 Please be aware that using these methods implies certain restrictions.
 You will not get a reference to the actual connection, but rather just
 references to the input or output stream of the connection. Not having
 a reference to the connection means that you will not be able to manipulate
 or query the connection directly. This in turn means that you will not
 be able to call any of the following methods:

 <UL>
 <LI> <CODE> getRequestMethod() </CODE>
 <LI> <CODE> setRequestMethod() </CODE>
 <LI> <CODE> getRequestProperty() </CODE>
 <LI> <CODE> setRequestProperty() </CODE>
 <LI> <CODE> getLength() </CODE>
 <LI> <CODE> getType() </CODE>
 <LI> <CODE> getEncoding() </CODE>
 <LI> <CODE> getHeaderField() </CODE>
 <LI> <CODE> getResponseCode() </CODE>
 <LI> <CODE> getResponseMessage() </CODE>
 <LI> <CODE> getHeaderFieldInt</CODE>
 <LI> <CODE> getHeaderFieldDate</CODE>
 <LI> <CODE> getExpiration</CODE>
 <LI> <CODE> getDate</CODE>
 <LI> <CODE> getLastModified</CODE>
 <LI> <CODE> getHeaderField</CODE>
 <LI> <CODE> getHeaderFieldKey</CODE>
 </UL>
<P>

<P>
<DL>
<DT><B>Since:</B></DT>
  <DD>MIDP 1.0</DD>
</DL>
<HR>

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


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

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Field Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#GET">GET</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP Get method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HEAD">HEAD</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP Head method.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_ACCEPTED">HTTP_ACCEPTED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;202: The request has been accepted for processing, but the processing
 has not been completed.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_BAD_GATEWAY">HTTP_BAD_GATEWAY</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;502: The server, while acting as a gateway or proxy, received an invalid
   response from the upstream server it accessed in attempting to
   fulfill the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_BAD_METHOD">HTTP_BAD_METHOD</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;405: The method specified in the Request-Line is not allowed for the
	resource identified by the Request-URI.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_BAD_REQUEST">HTTP_BAD_REQUEST</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;400: The request could not be understood by the server due to malformed
   syntax.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_CLIENT_TIMEOUT">HTTP_CLIENT_TIMEOUT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;408: The client did not produce a request within the time that the server
   was prepared to wait. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_CONFLICT">HTTP_CONFLICT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;409: The request could not be completed due to a conflict with
 the current state of the resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_CREATED">HTTP_CREATED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;201: The request has been fulfilled and resulted in a new
 resource being created.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_ENTITY_TOO_LARGE">HTTP_ENTITY_TOO_LARGE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;413: The server is refusing to process a request because the request
	entity is larger than the server is willing or able to process.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_EXPECT_FAILED">HTTP_EXPECT_FAILED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;417: The expectation given in an Expect request-header field
   could not be met by this server, or, if the server is a proxy,
   the server has unambiguous evidence that the request could not be met
   by the next-hop server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_FORBIDDEN">HTTP_FORBIDDEN</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;403:  The server understood the request, but is refusing to fulfill it.
   </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_GATEWAY_TIMEOUT">HTTP_GATEWAY_TIMEOUT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;504: The server, while acting as a gateway or proxy, did not receive a
   timely response from the upstream server specified by the URI
   or some other auxiliary server it needed
   to access in attempting to complete the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_GONE">HTTP_GONE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;410: The requested resource is no longer available at the server and no
	forwarding address is known.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_INTERNAL_ERROR">HTTP_INTERNAL_ERROR</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;500: The server encountered an unexpected condition which prevented it
	from fulfilling the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_LENGTH_REQUIRED">HTTP_LENGTH_REQUIRED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;411: The server refuses to accept the request without a defined Content-
	Length.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_MOVED_PERM">HTTP_MOVED_PERM</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;301:  The requested resource has been assigned a new permanent URI and
   any future references to this resource SHOULD use one of the returned
   URIs.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_MOVED_TEMP">HTTP_MOVED_TEMP</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;302: 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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_MULT_CHOICE">HTTP_MULT_CHOICE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;300: The requested resource corresponds to any one of a set of
   representations, each with its own specific location, and agent-
   driven negotiation information is being provided so that
   the user (or user agent) can select a preferred representation and
   redirect its request to that location.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NO_CONTENT">HTTP_NO_CONTENT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;204:  The server has fulfilled the request but does not need to
 return an entity-body, and might want to return updated
 meta-information.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NOT_ACCEPTABLE">HTTP_NOT_ACCEPTABLE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;406: The resource identified by the request is only capable of generating
   response entities which have content characteristics not acceptable
   according to the accept headers sent in the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NOT_AUTHORITATIVE">HTTP_NOT_AUTHORITATIVE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;203: The returned meta-information in the entity-header is not the
  definitive set as available from the origin server.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NOT_FOUND">HTTP_NOT_FOUND</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;404: The server has not found anything matching the Request-URI. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NOT_IMPLEMENTED">HTTP_NOT_IMPLEMENTED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;501: The server does not support the functionality required to
 fulfill the request.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_NOT_MODIFIED">HTTP_NOT_MODIFIED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;304: If the client has performed a conditional GET request and access is
   allowed, but the document has not been modified, the server SHOULD
   respond with this status code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_OK">HTTP_OK</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;200: The request has succeeded.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PARTIAL">HTTP_PARTIAL</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;206: The server has fulfilled the partial GET request for the resource.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PAYMENT_REQUIRED">HTTP_PAYMENT_REQUIRED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;402: This code is reserved for future use.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PRECON_FAILED">HTTP_PRECON_FAILED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_PROXY_AUTH">HTTP_PROXY_AUTH</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;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>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_RESET">HTTP_RESET</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_SEE_OTHER">HTTP_SEE_OTHER</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_TEMP_REDIRECT">HTTP_TEMP_REDIRECT</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNAUTHORIZED">HTTP_UNAUTHORIZED</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNAVAILABLE">HTTP_UNAVAILABLE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNSUPPORTED_RANGE">HTTP_UNSUPPORTED_RANGE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_UNSUPPORTED_TYPE">HTTP_UNSUPPORTED_TYPE</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_USE_PROXY">HTTP_USE_PROXY</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#HTTP_VERSION">HTTP_VERSION</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#POST">POST</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HTTP Post method.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->


<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getDate()">getDate</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getExpiration()">getExpiration</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getFile()">getFile</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderField(int)">getHeaderField</A></B>(int&nbsp;n)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderField(java.lang.String)">getHeaderField</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldDate(java.lang.String, long)">getHeaderFieldDate</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name,
                   long&nbsp;def)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldInt(java.lang.String, int)">getHeaderFieldInt</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name,
                  int&nbsp;def)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHeaderFieldKey(int)">getHeaderFieldKey</A></B>(int&nbsp;n)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getHost()">getHost</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the host information of the URL of
 this <code>HttpConnection</code>. e.g. host name or IPv4 address</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;long</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getLastModified()">getLastModified</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getPort()">getPort</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getProtocol()">getProtocol</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the protocol name of the URL of this
 <code>HttpConnection</code>. e.g., http or https</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getQuery()">getQuery</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRef()">getRef</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestMethod()">getRequestMethod</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the current request method. e.g. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestProperty(java.lang.String)">getRequestProperty</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;key)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getResponseCode()">getResponseCode</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the HTTP response status code.
 </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getResponseMessage()">getResponseMessage</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#getURL()">getURL</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestMethod(java.lang.String)">setRequestMethod</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;method)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestProperty(java.lang.String, java.lang.String)">setRequestProperty</A></B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;key,
                   <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the general request property. </TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.ContentConnection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.<A HREF="../../../javax/microedition/io/ContentConnection.html" title="interface in javax.microedition.io">ContentConnection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/io/ContentConnection.html#getEncoding()">getEncoding</A>, <A HREF="../../../javax/microedition/io/ContentConnection.html#getLength()">getLength</A>, <A HREF="../../../javax/microedition/io/ContentConnection.html#getType()">getType</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.InputConnection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.<A HREF="../../../javax/microedition/io/InputConnection.html" title="interface in javax.microedition.io">InputConnection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/io/InputConnection.html#openDataInputStream()">openDataInputStream</A>, <A HREF="../../../javax/microedition/io/InputConnection.html#openInputStream()">openInputStream</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.Connection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.<A HREF="../../../javax/microedition/io/Connection.html" title="interface in javax.microedition.io">Connection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/io/Connection.html#close()">close</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_javax.microedition.io.OutputConnection"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from interface javax.microedition.io.<A HREF="../../../javax/microedition/io/OutputConnection.html" title="interface in javax.microedition.io">OutputConnection</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../javax/microedition/io/OutputConnection.html#openDataOutputStream()">openDataOutputStream</A>, <A HREF="../../../javax/microedition/io/OutputConnection.html#openOutputStream()">openOutputStream</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="HEAD"><!-- --></A><H3>
HEAD</H3>
<PRE>
public static final <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>HEAD</B></PRE>
<DL>
<DD>HTTP Head method.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HEAD">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="GET"><!-- --></A><H3>
GET</H3>
<PRE>
public static final <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>GET</B></PRE>
<DL>
<DD>HTTP Get method.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.GET">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="POST"><!-- --></A><H3>
POST</H3>
<PRE>
public static final <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>POST</B></PRE>
<DL>
<DD>HTTP Post method.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.POST">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_OK"><!-- --></A><H3>
HTTP_OK</H3>
<PRE>
public static final int <B>HTTP_OK</B></PRE>
<DL>
<DD>200: The request has succeeded.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_OK">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_CREATED"><!-- --></A><H3>
HTTP_CREATED</H3>
<PRE>
public static final int <B>HTTP_CREATED</B></PRE>
<DL>
<DD>201: The request has been fulfilled and resulted in a new
 resource being created.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_CREATED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_ACCEPTED"><!-- --></A><H3>
HTTP_ACCEPTED</H3>
<PRE>
public static final int <B>HTTP_ACCEPTED</B></PRE>
<DL>
<DD>202: The request has been accepted for processing, but the processing
 has not been completed.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_ACCEPTED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NOT_AUTHORITATIVE"><!-- --></A><H3>
HTTP_NOT_AUTHORITATIVE</H3>
<PRE>
public static final int <B>HTTP_NOT_AUTHORITATIVE</B></PRE>
<DL>
<DD>203: The returned meta-information in the entity-header is not the
  definitive set as available from the origin server.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NOT_AUTHORITATIVE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NO_CONTENT"><!-- --></A><H3>
HTTP_NO_CONTENT</H3>
<PRE>
public static final int <B>HTTP_NO_CONTENT</B></PRE>
<DL>
<DD>204:  The server has fulfilled the request but does not need to
 return an entity-body, and might want to return updated
 meta-information.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NO_CONTENT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_RESET"><!-- --></A><H3>
HTTP_RESET</H3>
<PRE>
public static final int <B>HTTP_RESET</B></PRE>
<DL>
<DD>205: The server has fulfilled the request and the user agent SHOULD reset
	the document view which caused the request to be sent.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_RESET">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_PARTIAL"><!-- --></A><H3>
HTTP_PARTIAL</H3>
<PRE>
public static final int <B>HTTP_PARTIAL</B></PRE>
<DL>
<DD>206: The server has fulfilled the partial GET request for the resource.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_PARTIAL">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_MULT_CHOICE"><!-- --></A><H3>
HTTP_MULT_CHOICE</H3>
<PRE>
public static final int <B>HTTP_MULT_CHOICE</B></PRE>
<DL>
<DD>300: The requested resource corresponds to any one of a set of
   representations, each with its own specific location, and agent-
   driven negotiation information is being provided so that
   the user (or user agent) can select a preferred representation and
   redirect its request to that location.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_MULT_CHOICE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_MOVED_PERM"><!-- --></A><H3>
HTTP_MOVED_PERM</H3>
<PRE>
public static final int <B>HTTP_MOVED_PERM</B></PRE>
<DL>
<DD>301:  The requested resource has been assigned a new permanent URI and
   any future references to this resource SHOULD use one of the returned
   URIs.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_MOVED_PERM">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_MOVED_TEMP"><!-- --></A><H3>
HTTP_MOVED_TEMP</H3>
<PRE>
public static final int <B>HTTP_MOVED_TEMP</B></PRE>
<DL>
<DD>302: The requested resource resides temporarily under a
   different URI. (<strong>Note:</strong> the name of this
   status code
   reflects the earlier publication of RFC2068, which
   was changed in RFC2616 from "moved temporalily" to
   "found". The semantics were not changed. The <code>Location</code>
   header indicates where the application should resend
   the request.)
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_MOVED_TEMP">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_SEE_OTHER"><!-- --></A><H3>
HTTP_SEE_OTHER</H3>
<PRE>
public static final int <B>HTTP_SEE_OTHER</B></PRE>
<DL>
<DD>303: The response to the request can be found under a different URI and
   SHOULD be retrieved using a GET method on that resource.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_SEE_OTHER">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NOT_MODIFIED"><!-- --></A><H3>
HTTP_NOT_MODIFIED</H3>
<PRE>
public static final int <B>HTTP_NOT_MODIFIED</B></PRE>
<DL>
<DD>304: If the client has performed a conditional GET request and access is
   allowed, but the document has not been modified, the server SHOULD
   respond with this status code.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NOT_MODIFIED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_USE_PROXY"><!-- --></A><H3>
HTTP_USE_PROXY</H3>
<PRE>
public static final int <B>HTTP_USE_PROXY</B></PRE>
<DL>
<DD>305: The requested resource MUST be accessed through the proxy given by
	the Location field.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_USE_PROXY">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_TEMP_REDIRECT"><!-- --></A><H3>
HTTP_TEMP_REDIRECT</H3>
<PRE>
public static final int <B>HTTP_TEMP_REDIRECT</B></PRE>
<DL>
<DD>307: The requested resource resides temporarily under a different
   URI.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_TEMP_REDIRECT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_BAD_REQUEST"><!-- --></A><H3>
HTTP_BAD_REQUEST</H3>
<PRE>
public static final int <B>HTTP_BAD_REQUEST</B></PRE>
<DL>
<DD>400: The request could not be understood by the server due to malformed
   syntax.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_BAD_REQUEST">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_UNAUTHORIZED"><!-- --></A><H3>
HTTP_UNAUTHORIZED</H3>
<PRE>
public static final int <B>HTTP_UNAUTHORIZED</B></PRE>
<DL>
<DD>401: The request requires user authentication. The response MUST
   include a WWW-Authenticate header field  containing a challenge
   applicable to the requested resource.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_UNAUTHORIZED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_PAYMENT_REQUIRED"><!-- --></A><H3>
HTTP_PAYMENT_REQUIRED</H3>
<PRE>
public static final int <B>HTTP_PAYMENT_REQUIRED</B></PRE>
<DL>
<DD>402: This code is reserved for future use.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_PAYMENT_REQUIRED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_FORBIDDEN"><!-- --></A><H3>
HTTP_FORBIDDEN</H3>
<PRE>
public static final int <B>HTTP_FORBIDDEN</B></PRE>
<DL>
<DD>403:  The server understood the request, but is refusing to fulfill it.
   Authorization will not help and the request SHOULD NOT be repeated.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_FORBIDDEN">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NOT_FOUND"><!-- --></A><H3>
HTTP_NOT_FOUND</H3>
<PRE>
public static final int <B>HTTP_NOT_FOUND</B></PRE>
<DL>
<DD>404: The server has not found anything matching the Request-URI. No
   indication is given of whether the condition is temporary or
   permanent.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NOT_FOUND">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_BAD_METHOD"><!-- --></A><H3>
HTTP_BAD_METHOD</H3>
<PRE>
public static final int <B>HTTP_BAD_METHOD</B></PRE>
<DL>
<DD>405: The method specified in the Request-Line is not allowed for the
	resource identified by the Request-URI.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_BAD_METHOD">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NOT_ACCEPTABLE"><!-- --></A><H3>
HTTP_NOT_ACCEPTABLE</H3>
<PRE>
public static final int <B>HTTP_NOT_ACCEPTABLE</B></PRE>
<DL>
<DD>406: The resource identified by the request is only capable of generating
   response entities which have content characteristics not acceptable
   according to the accept headers sent in the request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NOT_ACCEPTABLE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_PROXY_AUTH"><!-- --></A><H3>
HTTP_PROXY_AUTH</H3>
<PRE>
public static final int <B>HTTP_PROXY_AUTH</B></PRE>
<DL>
<DD>407: This code is similar to 401 (Unauthorized), but indicates that the
	client must first authenticate itself with the proxy.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_PROXY_AUTH">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_CLIENT_TIMEOUT"><!-- --></A><H3>
HTTP_CLIENT_TIMEOUT</H3>
<PRE>
public static final int <B>HTTP_CLIENT_TIMEOUT</B></PRE>
<DL>
<DD>408: The client did not produce a request within the time that the server
   was prepared to wait. The client MAY repeat the request without
   modifications at any later time.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_CLIENT_TIMEOUT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_CONFLICT"><!-- --></A><H3>
HTTP_CONFLICT</H3>
<PRE>
public static final int <B>HTTP_CONFLICT</B></PRE>
<DL>
<DD>409: The request could not be completed due to a conflict with
 the current state of the resource.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_CONFLICT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_GONE"><!-- --></A><H3>
HTTP_GONE</H3>
<PRE>
public static final int <B>HTTP_GONE</B></PRE>
<DL>
<DD>410: The requested resource is no longer available at the server and no
	forwarding address is known.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_GONE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_LENGTH_REQUIRED"><!-- --></A><H3>
HTTP_LENGTH_REQUIRED</H3>
<PRE>
public static final int <B>HTTP_LENGTH_REQUIRED</B></PRE>
<DL>
<DD>411: The server refuses to accept the request without a defined Content-
	Length.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_LENGTH_REQUIRED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_PRECON_FAILED"><!-- --></A><H3>
HTTP_PRECON_FAILED</H3>
<PRE>
public static final int <B>HTTP_PRECON_FAILED</B></PRE>
<DL>
<DD>412: The precondition given in one or more of the request-header fields
	evaluated to false when it was tested on the server.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_PRECON_FAILED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_ENTITY_TOO_LARGE"><!-- --></A><H3>
HTTP_ENTITY_TOO_LARGE</H3>
<PRE>
public static final int <B>HTTP_ENTITY_TOO_LARGE</B></PRE>
<DL>
<DD>413: The server is refusing to process a request because the request
	entity is larger than the server is willing or able to process.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_ENTITY_TOO_LARGE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_REQ_TOO_LONG"><!-- --></A><H3>
HTTP_REQ_TOO_LONG</H3>
<PRE>
public static final int <B>HTTP_REQ_TOO_LONG</B></PRE>
<DL>
<DD>414: The server is refusing to service the request because the
 Request-URI is longer than the server is willing to interpret.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_REQ_TOO_LONG">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_UNSUPPORTED_TYPE"><!-- --></A><H3>
HTTP_UNSUPPORTED_TYPE</H3>
<PRE>
public static final int <B>HTTP_UNSUPPORTED_TYPE</B></PRE>
<DL>
<DD>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.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_UNSUPPORTED_TYPE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_UNSUPPORTED_RANGE"><!-- --></A><H3>
HTTP_UNSUPPORTED_RANGE</H3>
<PRE>
public static final int <B>HTTP_UNSUPPORTED_RANGE</B></PRE>
<DL>
<DD>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.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_UNSUPPORTED_RANGE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_EXPECT_FAILED"><!-- --></A><H3>
HTTP_EXPECT_FAILED</H3>
<PRE>
public static final int <B>HTTP_EXPECT_FAILED</B></PRE>
<DL>
<DD>417: The expectation given in an Expect request-header field
   could not be met by this server, or, if the server is a proxy,
   the server has unambiguous evidence that the request could not be met
   by the next-hop server.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_EXPECT_FAILED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_INTERNAL_ERROR"><!-- --></A><H3>
HTTP_INTERNAL_ERROR</H3>
<PRE>
public static final int <B>HTTP_INTERNAL_ERROR</B></PRE>
<DL>
<DD>500: The server encountered an unexpected condition which prevented it
	from fulfilling the request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_INTERNAL_ERROR">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_NOT_IMPLEMENTED"><!-- --></A><H3>
HTTP_NOT_IMPLEMENTED</H3>
<PRE>
public static final int <B>HTTP_NOT_IMPLEMENTED</B></PRE>
<DL>
<DD>501: The server does not support the functionality required to
 fulfill the request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_NOT_IMPLEMENTED">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_BAD_GATEWAY"><!-- --></A><H3>
HTTP_BAD_GATEWAY</H3>
<PRE>
public static final int <B>HTTP_BAD_GATEWAY</B></PRE>
<DL>
<DD>502: The server, while acting as a gateway or proxy, received an invalid
   response from the upstream server it accessed in attempting to
   fulfill the request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_BAD_GATEWAY">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_UNAVAILABLE"><!-- --></A><H3>
HTTP_UNAVAILABLE</H3>
<PRE>
public static final int <B>HTTP_UNAVAILABLE</B></PRE>
<DL>
<DD>503: The server is currently unable to handle the request due to a
   temporary overloading or maintenance of the server.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_UNAVAILABLE">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_GATEWAY_TIMEOUT"><!-- --></A><H3>
HTTP_GATEWAY_TIMEOUT</H3>
<PRE>
public static final int <B>HTTP_GATEWAY_TIMEOUT</B></PRE>
<DL>
<DD>504: The server, while acting as a gateway or proxy, did not receive a
   timely response from the upstream server specified by the URI
   or some other auxiliary server it needed
   to access in attempting to complete the request.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_GATEWAY_TIMEOUT">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="HTTP_VERSION"><!-- --></A><H3>
HTTP_VERSION</H3>
<PRE>
public static final int <B>HTTP_VERSION</B></PRE>
<DL>
<DD>505: The server does not support, or refuses to support, the HTTP
  protocol version that was used in the request message.
<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#javax.microedition.io.HttpConnection.HTTP_VERSION">Constant Field Values</A></DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->


<!-- ============ 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="getURL()"><!-- --></A><H3>
getURL</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getURL</B>()</PRE>
<DL>
<DD>Return a string representation of the URL for this connection.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the string representation of the URL for this connection.</DL>
</DD>
</DL>
<HR>

<A NAME="getProtocol()"><!-- --></A><H3>
getProtocol</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getProtocol</B>()</PRE>
<DL>
<DD>Returns the protocol name of the URL of this
 <code>HttpConnection</code>. e.g., http or https
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the protocol of the URL of this <code>HttpConnection</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="getHost()"><!-- --></A><H3>
getHost</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getHost</B>()</PRE>
<DL>
<DD>Returns the host information of the URL of
 this <code>HttpConnection</code>. e.g. host name or IPv4 address
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the host information of the URL of
 this <code>HttpConnection</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="getFile()"><!-- --></A><H3>
getFile</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getFile</B>()</PRE>
<DL>
<DD>Returns the file portion of the URL of this <code>HttpConnection</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the file portion of the URL of this <code>HttpConnection</code>.
 <code>null</code> is returned if there is no file.</DL>
</DD>
</DL>
<HR>

<A NAME="getRef()"><!-- --></A><H3>
getRef</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getRef</B>()</PRE>
<DL>
<DD>Returns the ref portion of the URL of this <code>HttpConnection</code>.
 RFC2396 specifies the optional fragment identifier as the
 the text after the crosshatch (#) character in the URL.
 This information  may be used by the user agent as additional
 reference information after the resource is successfully retrieved.
 The format and interpretation of the fragment identifier is dependent
 on the media type[RFC2046] of the retrieved information.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the ref portion of the URL of this <code>HttpConnection</code>.
 <code>null</code> is returned if there is no value.</DL>
</DD>
</DL>
<HR>

<A NAME="getQuery()"><!-- --></A><H3>
getQuery</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getQuery</B>()</PRE>
<DL>
<DD>Returns the query portion of the URL of this
 <code>HttpConnection</code>.

 RFC2396 defines the query component as the text after the first
 question-mark (?)  character in the URL.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the query portion of the URL of this
  <code>HttpConnection</code>.
 <code>null</code> is returned if there is no value.</DL>
</DD>
</DL>
<HR>

<A NAME="getPort()"><!-- --></A><H3>
getPort</H3>
<PRE>
public int <B>getPort</B>()</PRE>
<DL>
<DD>Returns the network port number of the URL for this
 <code>HttpConnection</code>.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the network port number of the URL for this
 <code>HttpConnection</code>.
 The default HTTP port number (80) is returned if there was
 no port number in the string passed to <code>Connector.open</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="getRequestMethod()"><!-- --></A><H3>
getRequestMethod</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getRequestMethod</B>()</PRE>
<DL>
<DD>Get the current request method. e.g. HEAD, GET, POST
 The default value is GET.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the HTTP request method<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestMethod(java.lang.String)"><CODE>setRequestMethod(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setRequestMethod(java.lang.String)"><!-- --></A><H3>
setRequestMethod</H3>
<PRE>
public void <B>setRequestMethod</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;method)
                      throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Set the method for the URL request, one of:
 <UL>
  <LI>GET
  <LI>POST
  <LI>HEAD
 </UL> are legal, subject to protocol restrictions.  The default
 method is GET.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>method</CODE> - the HTTP method
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if the method cannot be reset or if
              the requested method isn't valid for HTTP.<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestMethod()"><CODE>getRequestMethod()</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getRequestProperty(java.lang.String)"><!-- --></A><H3>
getRequestProperty</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getRequestProperty</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;key)</PRE>
<DL>
<DD>Returns the value of the named general request property for this
 connection.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the keyword by which the request property is
  known (e.g., "accept").
<DT><B>Returns:</B><DD>the value of the named general request property for this
           connection. If there is no key with the specified name then
		<CODE>null</CODE> is returned.<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/io/HttpConnection.html#setRequestProperty(java.lang.String, java.lang.String)"><CODE>setRequestProperty(java.lang.String, java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="setRequestProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>
setRequestProperty</H3>
<PRE>
public void <B>setRequestProperty</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;key,
                               <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;value)
                        throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Sets the general request property. If a property with the key already
 exists, overwrite its value with the new value.

 <p> <strong>Note:</strong> HTTP requires all request properties
 which can legally have multiple instances with the same key
 to use a comma-separated list syntax which enables multiple
 properties to be appended into a single property.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>key</CODE> - the keyword by which the request is known
                  (e.g., "<code>accept</code>").<DD><CODE>value</CODE> - the value associated with it.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - is thrown if the connection is in the
  connected state.<DT><B>See Also:</B><DD><A HREF="../../../javax/microedition/io/HttpConnection.html#getRequestProperty(java.lang.String)"><CODE>getRequestProperty(java.lang.String)</CODE></A></DL>
</DD>
</DL>
<HR>

<A NAME="getResponseCode()"><!-- --></A><H3>
getResponseCode</H3>
<PRE>
public int <B>getResponseCode</B>()
                    throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the HTTP response status code.
 It parses responses like:
 <PRE>
 HTTP/1.0 200 OK
 HTTP/1.0 401 Unauthorized
 </PRE>
 and extracts the ints 200 and 401 respectively.
 from the response (i.e., the response is not valid HTTP).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the HTTP Status-Code or -1 if no status code can be discerned.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getResponseMessage()"><!-- --></A><H3>
getResponseMessage</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getResponseMessage</B>()
                          throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Gets the HTTP response message, if any, returned along with the
 response code from a server.  From responses like:
 <PRE>
 HTTP/1.0 200 OK
 HTTP/1.0 404 Not Found
 </PRE>
 Extracts the Strings "OK" and "Not Found" respectively.
 Returns null if none could be discerned from the responses
 (the result was not valid HTTP).
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the HTTP response message, or <code>null</code>
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getExpiration()"><!-- --></A><H3>
getExpiration</H3>
<PRE>
public long <B>getExpiration</B>()
                   throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the <code>expires</code> header field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the expiration date of the resource that this URL references,
          or 0 if not known. The value is the number of milliseconds
          since January 1, 1970 GMT.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getDate()"><!-- --></A><H3>
getDate</H3>
<PRE>
public long <B>getDate</B>()
             throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the <code>date</code> header field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the sending date of the resource that the URL references,
          or <code>0</code> if not known. The value returned is the
          number of milliseconds since January 1, 1970 GMT.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getLastModified()"><!-- --></A><H3>
getLastModified</H3>
<PRE>
public long <B>getLastModified</B>()
                     throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the <code>last-modified</code> header field.
 The result is the number of milliseconds since January 1, 1970 GMT.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the date the resource referenced by this
          <code>HttpConnection</code> was last modified, or
  0 if not known.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getHeaderField(java.lang.String)"><!-- --></A><H3>
getHeaderField</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getHeaderField</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name)
                      throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the named header field.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - of a header field.
<DT><B>Returns:</B><DD>the value of the named header field, or <code>null</code>
          if there is no such field in the header.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getHeaderFieldInt(java.lang.String, int)"><!-- --></A><H3>
getHeaderFieldInt</H3>
<PRE>
public int <B>getHeaderFieldInt</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name,
                             int&nbsp;def)
                      throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the named field parsed as a number.
 <p>
 This form of <code>getHeaderField</code> exists because some
 connection types (e.g., <code>http-ng</code>) have pre-parsed
 headers. Classes for that connection type can override this method
 and short-circuit the parsing.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the header field.<DD><CODE>def</CODE> - the default value.
<DT><B>Returns:</B><DD>the value of the named field, parsed as an integer. The
          <code>def</code> value is returned if the field is
          missing or malformed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getHeaderFieldDate(java.lang.String, long)"><!-- --></A><H3>
getHeaderFieldDate</H3>
<PRE>
public long <B>getHeaderFieldDate</B>(<A HREF="../../../java/lang/String.html" title="class in java.lang">String</A>&nbsp;name,
                               long&nbsp;def)
                        throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Returns the value of the named field parsed as date.
 The result is the number of milliseconds since January 1, 1970 GMT
 represented by the named field.
 <p>
 This form of <code>getHeaderField</code> exists because some
 connection types (e.g., <code>http-ng</code>) have pre-parsed
 headers. Classes for that connection type can override this method
 and short-circuit the parsing.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>name</CODE> - the name of the header field.<DD><CODE>def</CODE> - a default value.
<DT><B>Returns:</B><DD>the value of the field, parsed as a date. The value of the
          <code>def</code> argument is returned if the field is
          missing or malformed.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getHeaderField(int)"><!-- --></A><H3>
getHeaderField</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getHeaderField</B>(int&nbsp;n)
                      throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Gets a header field value by index.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the index of the header field
<DT><B>Returns:</B><DD>the value of the  nth  header field or
 <code>null</code> if the array index is out of range.
 An empty String is returned if the field does not have a value.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</DL>
</DD>
</DL>
<HR>

<A NAME="getHeaderFieldKey(int)"><!-- --></A><H3>
getHeaderFieldKey</H3>
<PRE>
public <A HREF="../../../java/lang/String.html" title="class in java.lang">String</A> <B>getHeaderFieldKey</B>(int&nbsp;n)
                         throws <A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></PRE>
<DL>
<DD>Gets a header field key by index.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the index of the header field
<DT><B>Returns:</B><DD>the key of the nth header field or
  <code>null</code> if the array index is out of range.
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../java/io/IOException.html" title="class in java.io">IOException</A></CODE> - if an error occurred connecting to the server.</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="class-use/HttpConnection.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&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>
<strong>IM Profile</strong></EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../javax/microedition/io/DatagramConnection.html" title="interface in javax.microedition.io"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../javax/microedition/io/HttpsConnection.html" title="interface in javax.microedition.io"><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="HttpConnection.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;CONSTR&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=\mailto:midp-feedback@risc.sps.mot.com\>Submit a comment or suggestion</a> Version 2.0 of IM Profile Specification<br>Java is a trademark or registered trademark of Sun Microsystems,  Inc. in the US and other countries. Copyright (c) 1993-2002 Sun Microsystems, Inc. 901 San Antonio Road,Palo Alto, California, 94303, U.S.A.  All Rights Reserved.</font>
</BODY>
</HTML>
