Edit D:\app\Administrator\product\11.2.0\dbhome_1\owb\lib\int\HTTPClient\doc\api\HTTPClient\HTTPConnection.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon May 07 18:52:24 PDT 2001 --> <TITLE> HTTPClient API: Class HTTPConnection </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/DefaultAuthHandler.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/HttpHeaderElement.html"><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> <A HREF="HTTPConnection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> HTTPClient</FONT> <BR> Class HTTPConnection</H2> <PRE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>HTTPClient.HTTPConnection</B> </PRE> <HR> <DL> <DT>public class <B>HTTPConnection</B><DT>extends <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A><DT>implements HTTPClient.GlobalConstants, <A HREF="../HTTPClient/HTTPClientModuleConstants.html">HTTPClientModuleConstants</A></DL> <P> This class implements http protocol requests; it contains most of HTTP/1.1 and ought to be unconditionally compliant. Redirections are automatically handled, and authorizations requests are recognized and dealt with via an authorization handler. Only full HTTP/1.0 and HTTP/1.1 requests are generated. HTTP/1.1, HTTP/1.0 and HTTP/0.9 responses are recognized. <P>Using the HTTPClient should be quite simple. First add the import statement '<code>import HTTPClient.*;</code>' to your file(s). Request can then be sent using one of the methods <var>Head()</var>, <var>Get()</var>, <var>Post()</var>, etc in <var>HTTPConnection</var>. These methods all return an instance of <var>HTTPResponse</var> which has methods for accessing the response headers (<var>getHeader()</var>, <var>getHeaderAsInt()</var>, etc), various response info (<var>getStatusCode()</var>, <var>getReasonLine()</var>, etc) and the reponse data (<var>getData()</var>, <var>getText()</var>, and <var>getInputStream()</var>). Following are some examples. <P>If this is in an applet you can retrieve files from your server as follows: <PRE> try { HTTPConnection con = new HTTPConnection(this); HTTPResponse rsp = con.Get("/my_file"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else data = rsp.getData(); rsp = con.Get("/another_file"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else other_data = rsp.getData(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); } </PRE> This will get the files "/my_file" and "/another_file" and put their contents into byte[]'s accessible via <code>getData()</code>. Note that you need to only create a new <var>HTTPConnection</var> when sending a request to a new server (different host or port); although you may create a new <var>HTTPConnection</var> for every request to the same server this <strong>not</strong> recommended, as various information about the server is cached after the first request (to optimize subsequent requests) and persistent connections are used whenever possible. <P>To POST form data you would use something like this (assuming you have two fields called <var>name</var> and <var>e-mail</var>, whose contents are stored in the variables <var>name</var> and <var>email</var>): <PRE> try { NVPair form_data[] = new NVPair[2]; form_data[0] = new NVPair("name", name); form_data[1] = new NVPair("e-mail", email); HTTPConnection con = new HTTPConnection(this); HTTPResponse rsp = con.Post("/cgi-bin/my_script", form_data); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else stream = rsp.getInputStream(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); } </PRE> Here the response data is read at leasure via an <var>InputStream</var> instead of all at once into a <var>byte[]</var>. <P>As another example, if you have a URL you're trying to send a request to you would do something like the following: <PRE> try { URL url = new URL("http://www.mydomain.us/test/my_file"); HTTPConnection con = new HTTPConnection(url); HTTPResponse rsp = con.Put(url.getFile(), "Hello World"); if (rsp.getStatusCode() >= 300) { System.err.println("Received Error: "+rsp.getReasonLine()); System.err.println(rsp.getText()); } else text = rsp.getText(); } catch (IOException ioe) { System.err.println(ioe.toString()); } catch (ModuleException me) { System.err.println("Error handling request: " + me.getMessage()); } </PRE> <P>There are a whole number of methods for each request type; however the general forms are ([...] means that the enclosed is optional): <ul> <li> Head ( file [, form-data [, headers ] ] ) <li> Head ( file [, query [, headers ] ] ) <li> Get ( file [, form-data [, headers ] ] ) <li> Get ( file [, query [, headers ] ] ) <li> Post ( file [, form-data [, headers ] ] ) <li> Post ( file [, data [, headers ] ] ) <li> Post ( file [, stream [, headers ] ] ) <li> Put ( file , data [, headers ] ) <li> Put ( file , stream [, headers ] ) <li> Delete ( file [, headers ] ) <li> Options ( file [, headers [, data] ] ) <li> Options ( file [, headers [, stream] ] ) <li> Trace ( file [, headers ] ) </ul> <P> <DL> <DT><B>Version: </B><DD>0.3-3 06/05/2001</DD> <DT><B>Author: </B><DD>Ronald Tschal?</DD> </DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <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 <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#version">version</A></B></CODE> <BR> The current version of this package.</TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_HTTPClient.GlobalConstants"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from interface HTTPClient.GlobalConstants</B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE>CD_0, CD_CHUNKED, CD_CLOSE, CD_CONTLEN, CD_HDRS, CD_MP_BR, CD_NONE, HTTP, HTTP_1_0, HTTP_1_1, HTTP_NG, HTTPS, SHTTP</CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_HTTPClient.HTTPClientModuleConstants"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from interface HTTPClient.<A HREF="../HTTPClient/HTTPClientModuleConstants.html">HTTPClientModuleConstants</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_CONTINUE">REQ_CONTINUE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_NEWCON_RST">REQ_NEWCON_RST</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_NEWCON_SND">REQ_NEWCON_SND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RESPONSE">REQ_RESPONSE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RESTART">REQ_RESTART</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_RETURN">REQ_RETURN</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#REQ_SHORTCIRC">REQ_SHORTCIRC</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_CONTINUE">RSP_CONTINUE</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_NEWCON_REQ">RSP_NEWCON_REQ</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_NEWCON_SND">RSP_NEWCON_SND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_REQUEST">RSP_REQUEST</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_RESTART">RSP_RESTART</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_SEND">RSP_SEND</A>, <A HREF="../HTTPClient/HTTPClientModuleConstants.html#RSP_SHORTCIRC">RSP_SHORTCIRC</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.applet.Applet)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/applet/Applet.html">Applet</A> applet)</CODE> <BR> Constructs a connection to the host from where the applet was loaded.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.lang.String)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</CODE> <BR> Constructs a connection to the specified host on port 80</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.lang.String, int)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</CODE> <BR> Constructs a connection to the specified host on the specified port</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.lang.String, java.lang.String, int)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> prot, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</CODE> <BR> Constructs a connection to the specified host on the specified port, using the specified protocol (currently only "http" is supported).</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.lang.String, java.lang.String, int, java.net.InetAddress, int)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> prot, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/InetAddress.html">InetAddress</A> localAddr, int localPort)</CODE> <BR> Constructs a connection to the specified host on the specified port, using the specified protocol (currently only "http" is supported), local address, and local port.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(HTTPClient.URI)">HTTPConnection</A></B>(<A HREF="../HTTPClient/URI.html">URI</A> uri)</CODE> <BR> Constructs a connection to the host (port) as given in the uri.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#HTTPConnection(java.net.URL)">HTTPConnection</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/URL.html">URL</A> url)</CODE> <BR> Constructs a connection to the host (port) as given in the url.</TD> </TR> </TABLE> <!-- ========== 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> void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#addBasicAuthorization(java.lang.String, java.lang.String, java.lang.String)">addBasicAuthorization</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> realm, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> user, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> passwd)</CODE> <BR> Adds an authorization entry for the "basic" authorization scheme to the list.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#addDefaultModule(java.lang.Class, int)">addDefaultModule</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module, int pos)</CODE> <BR> Adds a module to the default list.</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="../HTTPClient/HTTPConnection.html#addDigestAuthorization(java.lang.String, java.lang.String, java.lang.String)">addDigestAuthorization</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> realm, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> user, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> passwd)</CODE> <BR> Adds an authorization entry for the "digest" authorization scheme to the list.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#addModule(java.lang.Class, int)">addModule</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module, int pos)</CODE> <BR> Adds a module to the current list.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Delete(java.lang.String)">Delete</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> Requests that <var>file</var> be DELETEd from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Delete(java.lang.String, HTTPClient.NVPair[])">Delete</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Requests that <var>file</var> be DELETEd from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#dontProxyFor(java.lang.String)">dontProxyFor</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</CODE> <BR> Add <var>host</var> to the list of hosts which should be accessed directly, not via any proxy set by <code>setProxyServer()</code>.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#dontProxyFor(java.lang.String[])">dontProxyFor</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A>[] hosts)</CODE> <BR> Convenience method to add a number of hosts at once.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#doProxyFor(java.lang.String)">doProxyFor</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</CODE> <BR> Remove <var>host</var> from the list of hosts for which the proxy should not be used.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#ExtensionMethod(java.lang.String, java.lang.String, byte[], HTTPClient.NVPair[])">ExtensionMethod</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> This is here to allow an arbitrary, non-standard request to be sent.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#ExtensionMethod(java.lang.String, java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])">ExtensionMethod</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> os, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> This is here to allow an arbitrary, non-standard request to be sent.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String)">Get</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> GETs the file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, HTTPClient.NVPair[])">Get</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data)</CODE> <BR> GETs the file with a query consisting of the specified form-data.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])">Get</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> GETs the file with a query consisting of the specified form-data.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, java.lang.String)">Get</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query)</CODE> <BR> GETs the file using the specified query string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, java.lang.String, HTTPClient.NVPair[])">Get</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> GETs the file using the specified query string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getAllowUserInteraction()">getAllowUserInteraction</A></B>()</CODE> <BR> returns whether modules are allowed to prompt or popup dialogs if neccessary.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getContext()">getContext</A></B>()</CODE> <BR> Returns the current context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getDefaultAllowUserInteraction()">getDefaultAllowUserInteraction</A></B>()</CODE> <BR> Gets the default allow-user-action.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getDefaultContext()">getDefaultContext</A></B>()</CODE> <BR> Returns the default context.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/NVPair.html">NVPair</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getDefaultHeaders()">getDefaultHeaders</A></B>()</CODE> <BR> Gets the current list of default http headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getDefaultModules()">getDefaultModules</A></B>()</CODE> <BR> Returns the default list of modules.</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="../HTTPClient/HTTPConnection.html#getDefaultTimeout()">getDefaultTimeout</A></B>()</CODE> <BR> Gets the default timeout value to be used for each new HTTPConnection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getHost()">getHost</A></B>()</CODE> <BR> Returns the host this connection is talking to.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getModules()">getModules</A></B>()</CODE> <BR> Returns the list of modules used currently.</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="../HTTPClient/HTTPConnection.html#getPort()">getPort</A></B>()</CODE> <BR> Returns the port this connection connects to.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getProtocol()">getProtocol</A></B>()</CODE> <BR> Returns the protocol this connection is talking.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#getProxyHost()">getProxyHost</A></B>()</CODE> <BR> Returns the host of the proxy this connection is using.</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="../HTTPClient/HTTPConnection.html#getProxyPort()">getProxyPort</A></B>()</CODE> <BR> Returns the port of the proxy this connection is using.</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="../HTTPClient/HTTPConnection.html#getTimeout()">getTimeout</A></B>()</CODE> <BR> Gets the timeout used for reading response data.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Head(java.lang.String)">Head</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> Sends the HEAD request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Head(java.lang.String, HTTPClient.NVPair[])">Head</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data)</CODE> <BR> Sends the HEAD request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Head(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])">Head</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Sends the HEAD request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Head(java.lang.String, java.lang.String)">Head</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query)</CODE> <BR> Sends the HEAD request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Head(java.lang.String, java.lang.String, HTTPClient.NVPair[])">Head</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Sends the HEAD request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#isCompatibleWith(HTTPClient.URI)">isCompatibleWith</A></B>(<A HREF="../HTTPClient/URI.html">URI</A> uri)</CODE> <BR> See if the given uri is compatible with this connection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Options(java.lang.String)">Options</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> Request OPTIONS from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Options(java.lang.String, HTTPClient.NVPair[])">Options</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Request OPTIONS from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Options(java.lang.String, HTTPClient.NVPair[], byte[])">Options</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, byte[] data)</CODE> <BR> Request OPTIONS from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Options(java.lang.String, HTTPClient.NVPair[], HTTPClient.HttpOutputStream)">Options</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream)</CODE> <BR> Request OPTIONS from the server.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String)">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> POSTs to the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, byte[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data)</CODE> <BR> POSTs the raw data to the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, byte[], HTTPClient.NVPair[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> POSTs the raw data to the specified file using the specified headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, HTTPClient.HttpOutputStream)">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream)</CODE> <BR> POSTs the data written to the output stream to the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> POSTs the data written to the output stream to the specified file using the specified headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, HTTPClient.NVPair[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data)</CODE> <BR> POSTs form-data to the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> POST's form-data to the specified file using the specified headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, java.lang.String)">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data)</CODE> <BR> POSTs the data to the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Post(java.lang.String, java.lang.String, HTTPClient.NVPair[])">Post</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> POSTs the data to the specified file using the specified headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, byte[])">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data)</CODE> <BR> PUTs the raw data into the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, byte[], HTTPClient.NVPair[])">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> PUTs the raw data into the specified file using the additional headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, HTTPClient.HttpOutputStream)">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream)</CODE> <BR> PUTs the data written to the output stream into the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> PUTs the data written to the output stream into the specified file using the additional headers.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, java.lang.String)">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data)</CODE> <BR> PUTs the data into the specified file.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Put(java.lang.String, java.lang.String, HTTPClient.NVPair[])">Put</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> PUTs the data into the specified file using the additional headers for the request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#removeDefaultModule(java.lang.Class)">removeDefaultModule</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module)</CODE> <BR> Removes a module from the default list.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#removeModule(java.lang.Class)">removeModule</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module)</CODE> <BR> Removes a module from the current list.</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="../HTTPClient/HTTPConnection.html#setAllowUserInteraction(boolean)">setAllowUserInteraction</A></B>(boolean allow)</CODE> <BR> Controls whether modules are allowed to prompt the user or pop up dialogs if neccessary.</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="../HTTPClient/HTTPConnection.html#setContext(java.lang.Object)">setContext</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</CODE> <BR> Sets the current context.</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="../HTTPClient/HTTPConnection.html#setCurrentProxy(java.lang.String, int)">setCurrentProxy</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</CODE> <BR> Sets the proxy used by this instance.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setDefaultAllowUserInteraction(boolean)">setDefaultAllowUserInteraction</A></B>(boolean allow)</CODE> <BR> Sets the default allow-user-action.</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="../HTTPClient/HTTPConnection.html#setDefaultHeaders(HTTPClient.NVPair[])">setDefaultHeaders</A></B>(<A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Sets the default http headers to be sent with each request.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setDefaultTimeout(int)">setDefaultTimeout</A></B>(int time)</CODE> <BR> Sets the default timeout value to be used for each new HTTPConnection.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setProxyServer(java.lang.String, int)">setProxyServer</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</CODE> <BR> Sets the default proxy server to use.</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="../HTTPClient/HTTPConnection.html#setRawMode(boolean)">setRawMode</A></B>(boolean raw)</CODE> <BR> <B>Deprecated.</B> <I>This is not really needed anymore; in V0.2 request were synchronous and therefore to do pipelining you needed to disable the processing of responses.</I></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setSocksServer(java.lang.String)">setSocksServer</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</CODE> <BR> Sets the SOCKS server to use.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setSocksServer(java.lang.String, int)">setSocksServer</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</CODE> <BR> Sets the SOCKS server to use.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setSocksServer(java.lang.String, int, int)">setSocksServer</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port, int version)</CODE> <BR> Sets the SOCKS server to use.</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="../HTTPClient/HTTPConnection.html#setTimeout(int)">setTimeout</A></B>(int time)</CODE> <BR> Sets the timeout to be used for creating connections and reading responses.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#setupRequest(java.lang.String, java.lang.String, HTTPClient.NVPair[], byte[], HTTPClient.HttpOutputStream)">setupRequest</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> resource, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, byte[] entity, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream)</CODE> <BR> Sets up the request, creating the list of headers to send and creating instances of the modules.</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="../HTTPClient/HTTPConnection.html#stop()">stop</A></B>()</CODE> <BR> Aborts all the requests currently in progress on this connection and closes all associated sockets.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#toString()">toString</A></B>()</CODE> <BR> Generates a string of the form protocol://host.domain:port .</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Trace(java.lang.String)">Trace</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file)</CODE> <BR> Requests a TRACE.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/HTTPConnection.html#Trace(java.lang.String, HTTPClient.NVPair[])">Trace</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</CODE> <BR> Requests a TRACE.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="version"><!-- --></A><H3> version</H3> <PRE> public static final <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>version</B></PRE> <DL> <DD>The current version of this package.</DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="HTTPConnection(java.applet.Applet)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/applet/Applet.html">Applet</A> applet) throws <A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A></PRE> <DL> <DD>Constructs a connection to the host from where the applet was loaded. Note that current security policies only let applets connect home.<DD><DL> <DT><B>Parameters:</B><DD><CODE>applet</CODE> - the current applet</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(java.lang.String)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</PRE> <DL> <DD>Constructs a connection to the specified host on port 80<DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(java.lang.String, int)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</PRE> <DL> <DD>Constructs a connection to the specified host on the specified port<DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host<DD><CODE>port</CODE> - the port</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(java.lang.String, java.lang.String, int)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> prot, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port) throws <A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A></PRE> <DL> <DD>Constructs a connection to the specified host on the specified port, using the specified protocol (currently only "http" is supported).<DD><DL> <DT><B>Parameters:</B><DD><CODE>prot</CODE> - the protocol<DD><CODE>host</CODE> - the host<DD><CODE>port</CODE> - the port, or -1 for the default port<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A> - if the protocol is not HTTP</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(java.lang.String, java.lang.String, int, java.net.InetAddress, int)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> prot, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/InetAddress.html">InetAddress</A> localAddr, int localPort) throws <A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A></PRE> <DL> <DD>Constructs a connection to the specified host on the specified port, using the specified protocol (currently only "http" is supported), local address, and local port.<DD><DL> <DT><B>Parameters:</B><DD><CODE>prot</CODE> - the protocol<DD><CODE>host</CODE> - the host<DD><CODE>port</CODE> - the port, or -1 for the default port<DD><CODE>localAddr</CODE> - the local address to bind to<DD><CODE>lcoalPort</CODE> - the local port to bind to<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A> - if the protocol is not HTTP</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(java.net.URL)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/URL.html">URL</A> url) throws <A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A></PRE> <DL> <DD>Constructs a connection to the host (port) as given in the url.<DD><DL> <DT><B>Parameters:</B><DD><CODE>url</CODE> - the url<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A> - if the protocol is not HTTP</DL> </DD> </DL> <HR> <A NAME="HTTPConnection(HTTPClient.URI)"><!-- --></A><H3> HTTPConnection</H3> <PRE> public <B>HTTPConnection</B>(<A HREF="../HTTPClient/URI.html">URI</A> uri) throws <A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A></PRE> <DL> <DD>Constructs a connection to the host (port) as given in the uri.<DD><DL> <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the uri<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ProtocolNotSuppException.html">ProtocolNotSuppException</A> - if the protocol is not HTTP</DL> </DD> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Head(java.lang.String)"><!-- --></A><H3> Head</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Head</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sends the HEAD request. This request is just like the corresponding GET except that it only returns the headers and no data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String)"><CODE>Get(java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="Head(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Head</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Head</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sends the HEAD request. This request is just like the corresponding GET except that it only returns the headers and no data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, HTTPClient.NVPair[])"><CODE>Get(java.lang.String, HTTPClient.NVPair[])</CODE></A></DL> </DD> </DL> <HR> <A NAME="Head(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])"><!-- --></A><H3> Head</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Head</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sends the HEAD request. This request is just like the corresponding GET except that it only returns the headers and no data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])"><CODE>Get(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])</CODE></A></DL> </DD> </DL> <HR> <A NAME="Head(java.lang.String, java.lang.String)"><!-- --></A><H3> Head</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Head</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sends the HEAD request. This request is just like the corresponding GET except that it only returns the headers and no data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>query</CODE> - the query string; it will be urlencoded<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, java.lang.String)"><CODE>Get(java.lang.String, java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="Head(java.lang.String, java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Head</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Head</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sends the HEAD request. This request is just like the corresponding GET except that it only returns the headers and no data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>query</CODE> - the query string; it will be urlencoded<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#Get(java.lang.String, java.lang.String, HTTPClient.NVPair[])"><CODE>Get(java.lang.String, java.lang.String, HTTPClient.NVPair[])</CODE></A></DL> </DD> </DL> <HR> <A NAME="Get(java.lang.String)"><!-- --></A><H3> Get</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Get</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>GETs the file.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Get(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Get</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Get</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>GETs the file with a query consisting of the specified form-data. The data is urlencoded, turned into a string of the form "name1=value1&name2=value2" and then sent as a query string.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Get(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])"><!-- --></A><H3> Get</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Get</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>GETs the file with a query consisting of the specified form-data. The data is urlencoded, turned into a string of the form "name1=value1&name2=value2" and then sent as a query string.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Get(java.lang.String, java.lang.String)"><!-- --></A><H3> Get</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Get</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>GETs the file using the specified query string. The query string is first urlencoded.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>query</CODE> - the query<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Get(java.lang.String, java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Get</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Get</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> query, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>GETs the file using the specified query string. The query string is first urlencoded.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>query</CODE> - the query string<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String)"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs to the specified file. No data is sent.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs form-data to the specified file. The data is first urlencoded and then turned into a string of the form "name1=value1&name2=value2". A <var>Content-type</var> header with the value <var>application/x-www-form-urlencoded</var> is added.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, HTTPClient.NVPair[], HTTPClient.NVPair[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] form_data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POST's form-data to the specified file using the specified headers. The data is first urlencoded and then turned into a string of the form "name1=value1&name2=value2". If no <var>Content-type</var> header is given then one is added with a value of <var>application/x-www-form-urlencoded</var>.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>form_data</CODE> - an array of Name/Value pairs<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>a HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, java.lang.String)"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the data to the specified file. The data is converted to an array of bytes using the default character converter. The request is sent using the content-type "application/octet-stream".<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><CODE>String.getBytes()</CODE></DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the data to the specified file using the specified headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><CODE>String.getBytes()</CODE></DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, byte[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the raw data to the specified file. The request is sent using the content-type "application/octet-stream"<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, byte[], HTTPClient.NVPair[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the raw data to the specified file using the specified headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, HTTPClient.HttpOutputStream)"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the data written to the output stream to the specified file. The request is sent using the content-type "application/octet-stream"<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>stream</CODE> - the output stream on which the data is written<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Post(java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])"><!-- --></A><H3> Post</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Post</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>POSTs the data written to the output stream to the specified file using the specified headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>stream</CODE> - the output stream on which the data is written<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, java.lang.String)"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the data into the specified file. The data is converted to an array of bytes using the default character converter. The request ist sent using the content-type "application/octet-stream".<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><CODE>String.getBytes()</CODE></DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the data into the specified file using the additional headers for the request.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.<DT><B>See Also: </B><DD><CODE>String.getBytes()</CODE></DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, byte[])"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the raw data into the specified file. The request is sent using the content-type "application/octet-stream".<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, byte[], HTTPClient.NVPair[])"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the raw data into the specified file using the additional headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>data</CODE> - the data<DD><CODE>headers</CODE> - any additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, HTTPClient.HttpOutputStream)"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the data written to the output stream into the specified file. The request is sent using the content-type "application/octet-stream".<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>stream</CODE> - the output stream on which the data is written<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Put(java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])"><!-- --></A><H3> Put</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Put</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>PUTs the data written to the output stream into the specified file using the additional headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the file<DD><CODE>stream</CODE> - the output stream on which the data is written<DD><CODE>headers</CODE> - any additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Options(java.lang.String)"><!-- --></A><H3> Options</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Options</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Request OPTIONS from the server. If <var>file</var> is "*" then the request applies to the server as a whole; otherwise it applies only to that resource.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource, or "*"<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Options(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Options</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Options</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Request OPTIONS from the server. If <var>file</var> is "*" then the request applies to the server as a whole; otherwise it applies only to that resource.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource, or "*"<DD><CODE>headers</CODE> - the headers containing optional info.<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Options(java.lang.String, HTTPClient.NVPair[], byte[])"><!-- --></A><H3> Options</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Options</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, byte[] data) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Request OPTIONS from the server. If <var>file</var> is "*" then the request applies to the server as a whole; otherwise it applies only to that resource.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource, or "*"<DD><CODE>headers</CODE> - the headers containing optional info.<DD><CODE>data</CODE> - any data to be sent in the optional body<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Options(java.lang.String, HTTPClient.NVPair[], HTTPClient.HttpOutputStream)"><!-- --></A><H3> Options</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Options</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Request OPTIONS from the server. If <var>file</var> is "*" then the request applies to the server as a whole; otherwise it applies only to that resource.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource, or "*"<DD><CODE>headers</CODE> - the headers containing optional info.<DD><CODE>stream</CODE> - an output stream for sending the optional body<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Delete(java.lang.String)"><!-- --></A><H3> Delete</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Delete</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Requests that <var>file</var> be DELETEd from the server.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Delete(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Delete</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Delete</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Requests that <var>file</var> be DELETEd from the server.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Trace(java.lang.String, HTTPClient.NVPair[])"><!-- --></A><H3> Trace</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Trace</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Requests a TRACE. Headers of particular interest here are "Via" and "Max-Forwards".<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource<DD><CODE>headers</CODE> - additional headers<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="Trace(java.lang.String)"><!-- --></A><H3> Trace</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>Trace</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Requests a TRACE.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>file</CODE> - the absolute path of the resource<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="ExtensionMethod(java.lang.String, java.lang.String, byte[], HTTPClient.NVPair[])"><!-- --></A><H3> ExtensionMethod</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>ExtensionMethod</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, byte[] data, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>This is here to allow an arbitrary, non-standard request to be sent. I'm assuming you know what you are doing...<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>method</CODE> - the extension method<DD><CODE>file</CODE> - the absolute path of the resource, or null<DD><CODE>data</CODE> - optional data, or null<DD><CODE>headers</CODE> - optional headers, or null<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="ExtensionMethod(java.lang.String, java.lang.String, HTTPClient.HttpOutputStream, HTTPClient.NVPair[])"><!-- --></A><H3> ExtensionMethod</H3> <PRE> public <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>ExtensionMethod</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> file, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> os, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>This is here to allow an arbitrary, non-standard request to be sent. I'm assuming you know what you are doing...<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>method</CODE> - the extension method<DD><CODE>file</CODE> - the absolute path of the resource, or null<DD><CODE>stream</CODE> - optional output stream, or null<DD><CODE>headers</CODE> - optional headers, or null<DT><B>Returns:</B><DD>an HTTPResponse structure containing the response<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="stop()"><!-- --></A><H3> stop</H3> <PRE> public void <B>stop</B>()</PRE> <DL> <DD>Aborts all the requests currently in progress on this connection and closes all associated sockets. You usually do <em>not</em> need to invoke this - it only meant for when you need to abruptly stop things, such as for example the stop button in a browser. <P>Note: there is a small window where a request method such as <code>Get()</code> may have been invoked but the request has not been built and added to the list. Any request in this window will not be aborted.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Since: </B><DD>V0.2-3</DD> </DL> </DD> </DL> <HR> <A NAME="setDefaultHeaders(HTTPClient.NVPair[])"><!-- --></A><H3> setDefaultHeaders</H3> <PRE> public void <B>setDefaultHeaders</B>(<A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers)</PRE> <DL> <DD>Sets the default http headers to be sent with each request. The actual headers sent are determined as follows: for each header specified in multiple places a value given as part of the request takes priority over any default values set by this method, which in turn takes priority over any built-in default values. A different way of looking at it is that we start off with a list of all headers specified with the request, then add any default headers set by this method which aren't already in our list, and finally add any built-in headers which aren't yet in the list. There is one exception to this rule: the "Content-length" header is always ignored; and when posting form-data any default "Content-type" is ignored in favor of the built-in "application/x-www-form-urlencoded" (however it will be overriden by any content-type header specified as part of the request). <P>Typical headers you might want to set here are "Accept" and its "Accept-*" relatives, "Connection", "From", "User-Agent", etc.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>headers</CODE> - an array of header-name/value pairs (do not give the separating ':').</DL> </DD> </DL> <HR> <A NAME="getDefaultHeaders()"><!-- --></A><H3> getDefaultHeaders</H3> <PRE> public <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] <B>getDefaultHeaders</B>()</PRE> <DL> <DD>Gets the current list of default http headers.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of header/value pairs.</DL> </DD> </DL> <HR> <A NAME="getProtocol()"><!-- --></A><H3> getProtocol</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getProtocol</B>()</PRE> <DL> <DD>Returns the protocol this connection is talking.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a string containing the (lowercased) protocol</DL> </DD> </DL> <HR> <A NAME="getHost()"><!-- --></A><H3> getHost</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getHost</B>()</PRE> <DL> <DD>Returns the host this connection is talking to.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a string containing the (lowercased) host name.</DL> </DD> </DL> <HR> <A NAME="getPort()"><!-- --></A><H3> getPort</H3> <PRE> public int <B>getPort</B>()</PRE> <DL> <DD>Returns the port this connection connects to. This is always the actual port number, never -1.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the port number</DL> </DD> </DL> <HR> <A NAME="getProxyHost()"><!-- --></A><H3> getProxyHost</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getProxyHost</B>()</PRE> <DL> <DD>Returns the host of the proxy this connection is using.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a string containing the (lowercased) host name.</DL> </DD> </DL> <HR> <A NAME="getProxyPort()"><!-- --></A><H3> getProxyPort</H3> <PRE> public int <B>getProxyPort</B>()</PRE> <DL> <DD>Returns the port of the proxy this connection is using.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the port number</DL> </DD> </DL> <HR> <A NAME="isCompatibleWith(HTTPClient.URI)"><!-- --></A><H3> isCompatibleWith</H3> <PRE> public boolean <B>isCompatibleWith</B>(<A HREF="../HTTPClient/URI.html">URI</A> uri)</PRE> <DL> <DD>See if the given uri is compatible with this connection. Compatible means that the given uri can be retrieved using this connection object.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>uri</CODE> - the URI to check<DT><B>Returns:</B><DD>true if they're compatible, false otherwise<DT><B>Since: </B><DD>V0.3-2</DD> </DL> </DD> </DL> <HR> <A NAME="setRawMode(boolean)"><!-- --></A><H3> setRawMode</H3> <PRE> public void <B>setRawMode</B>(boolean raw)</PRE> <DL> <DD><B>Deprecated.</B> <I>This is not really needed anymore; in V0.2 request were synchronous and therefore to do pipelining you needed to disable the processing of responses.</I> <P> <DD>Sets/Resets raw mode. In raw mode all modules are bypassed, meaning the automatic handling of authorization requests, redirections, cookies, etc. is turned off. <P>The default is false.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>raw</CODE> - if true removes all modules (except for the retry module)<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#removeModule(java.lang.Class)"><CODE>removeModule(java.lang.Class)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setDefaultTimeout(int)"><!-- --></A><H3> setDefaultTimeout</H3> <PRE> public static void <B>setDefaultTimeout</B>(int time)</PRE> <DL> <DD>Sets the default timeout value to be used for each new HTTPConnection. The default is 0.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>time</CODE> - the timeout in milliseconds.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setTimeout(int)"><CODE>setTimeout(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="getDefaultTimeout()"><!-- --></A><H3> getDefaultTimeout</H3> <PRE> public static int <B>getDefaultTimeout</B>()</PRE> <DL> <DD>Gets the default timeout value to be used for each new HTTPConnection.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the timeout in milliseconds.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setTimeout(int)"><CODE>setTimeout(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setTimeout(int)"><!-- --></A><H3> setTimeout</H3> <PRE> public void <B>setTimeout</B>(int time)</PRE> <DL> <DD>Sets the timeout to be used for creating connections and reading responses. When a timeout expires the operation will throw an InterruptedIOException. The operation may be restarted again afterwards. If the operation is not restarted and it is a read operation (i.e HTTPResponse.xxxx()) then <code>resp.getInputStream().close()</code> <strong>should</strong> be invoked. <P>When creating new sockets the timeout will limit the time spent doing the host name translation and establishing the connection with the server. <P>The timeout also influences the reading of the response headers. However, it does not specify a how long, for example, getStatusCode() may take, as might be assumed. Instead it specifies how long a read on the socket may take. If the response dribbles in slowly with packets arriving quicker than the timeout then the method will complete normally. I.e. the exception is only thrown if nothing arrives on the socket for the specified time. Furthermore, the timeout only influences the reading of the headers, not the reading of the body. <P>Read Timeouts are associated with responses, so that you may change this value before each request and it won't affect the reading of responses to previous requests.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>time</CODE> - the time in milliseconds. A time of 0 means wait indefinitely.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#stop()"><CODE>stop()</CODE></A></DL> </DD> </DL> <HR> <A NAME="getTimeout()"><!-- --></A><H3> getTimeout</H3> <PRE> public int <B>getTimeout</B>()</PRE> <DL> <DD>Gets the timeout used for reading response data.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the current timeout value<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setTimeout(int)"><CODE>setTimeout(int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setAllowUserInteraction(boolean)"><!-- --></A><H3> setAllowUserInteraction</H3> <PRE> public void <B>setAllowUserInteraction</B>(boolean allow)</PRE> <DL> <DD>Controls whether modules are allowed to prompt the user or pop up dialogs if neccessary.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>allow</CODE> - if true allows modules to interact with user.</DL> </DD> </DL> <HR> <A NAME="getAllowUserInteraction()"><!-- --></A><H3> getAllowUserInteraction</H3> <PRE> public boolean <B>getAllowUserInteraction</B>()</PRE> <DL> <DD>returns whether modules are allowed to prompt or popup dialogs if neccessary.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if modules are allowed to interact with user.</DL> </DD> </DL> <HR> <A NAME="setDefaultAllowUserInteraction(boolean)"><!-- --></A><H3> setDefaultAllowUserInteraction</H3> <PRE> public static void <B>setDefaultAllowUserInteraction</B>(boolean allow)</PRE> <DL> <DD>Sets the default allow-user-action.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>allow</CODE> - if true allows modules to interact with user.</DL> </DD> </DL> <HR> <A NAME="getDefaultAllowUserInteraction()"><!-- --></A><H3> getDefaultAllowUserInteraction</H3> <PRE> public static boolean <B>getDefaultAllowUserInteraction</B>()</PRE> <DL> <DD>Gets the default allow-user-action.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if modules are allowed to interact with user.</DL> </DD> </DL> <HR> <A NAME="getDefaultModules()"><!-- --></A><H3> getDefaultModules</H3> <PRE> public static <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A>[] <B>getDefaultModules</B>()</PRE> <DL> <DD>Returns the default list of modules.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of classes</DL> </DD> </DL> <HR> <A NAME="addDefaultModule(java.lang.Class, int)"><!-- --></A><H3> addDefaultModule</H3> <PRE> public static boolean <B>addDefaultModule</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module, int pos)</PRE> <DL> <DD>Adds a module to the default list. It must implement the <var>HTTPClientModule</var> interface. If the module is already in the list then this method does nothing. This method only affects instances of HTTPConnection created after this method has been invoked; it does not affect existing instances. <P>Example: <PRE> HTTPConnection.addDefaultModule(Class.forName("HTTPClient.CookieModule"), 1); </PRE> adds the cookie module as the second module in the list. <P>The default list is created at class initialization time from the property <var>HTTPClient.Modules</var>. This must contain a "|" separated list of classes in the order they're to be invoked. If this property is not set it defaults to: "HTTPClient.RetryModule | HTTPClient.CookieModule | HTTPClient.RedirectionModule | HTTPClient.AuthorizationModule | HTTPClient.DefaultModule | HTTPClient.TransferEncodingModule | HTTPClient.ContentMD5Module | HTTPClient.ContentEncodingModule"<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>module</CODE> - the module's Class object<DD><CODE>pos</CODE> - the position of this module in the list; if <var>pos</var> >= 0 then this is the absolute position in the list (0 is the first position); if <var>pos</var> < 0 then this is the position relative to the end of the list (-1 means the last element, -2 the second to last element, etc).<DT><B>Returns:</B><DD>true if module was successfully added; false if the module is already in the list.<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A> - if <var>pos</var> > list-size or if <var>pos</var> < -(list-size).<DD>ClassCastException - if <var>module</var> does not implement the <var>HTTPClientModule</var> interface.<DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/RuntimeException.html">RuntimeException</A> - if <var>module</var> cannot be instantiated.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html"><CODE>HTTPClientModule</CODE></A></DL> </DD> </DL> <HR> <A NAME="removeDefaultModule(java.lang.Class)"><!-- --></A><H3> removeDefaultModule</H3> <PRE> public static boolean <B>removeDefaultModule</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module)</PRE> <DL> <DD>Removes a module from the default list. If the module is not in the list it does nothing. This method only affects instances of HTTPConnection created after this method has been invoked; it does not affect existing instances.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>module</CODE> - the module's Class object<DT><B>Returns:</B><DD>true if module was successfully removed; false otherwise</DL> </DD> </DL> <HR> <A NAME="getModules()"><!-- --></A><H3> getModules</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A>[] <B>getModules</B>()</PRE> <DL> <DD>Returns the list of modules used currently.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>an array of classes</DL> </DD> </DL> <HR> <A NAME="addModule(java.lang.Class, int)"><!-- --></A><H3> addModule</H3> <PRE> public boolean <B>addModule</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module, int pos)</PRE> <DL> <DD>Adds a module to the current list. It must implement the <var>HTTPClientModule</var> interface. If the module is already in the list then this method does nothing.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>module</CODE> - the module's Class object<DD><CODE>pos</CODE> - the position of this module in the list; if <var>pos</var> >= 0 then this is the absolute position in the list (0 is the first position); if <var>pos</var> < 0 then this is the position relative to the end of the list (-1 means the last element, -2 the second to last element, etc).<DT><B>Returns:</B><DD>true if module was successfully added; false if the module is already in the list.<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/ArrayIndexOutOfBoundsException.html">ArrayIndexOutOfBoundsException</A> - if <var>pos</var> > list-size or if <var>pos</var> < -(list-size).<DD>ClassCastException - if <var>module</var> does not implement the <var>HTTPClientModule</var> interface.<DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/RuntimeException.html">RuntimeException</A> - if <var>module</var> cannot be instantiated.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPClientModule.html"><CODE>HTTPClientModule</CODE></A></DL> </DD> </DL> <HR> <A NAME="removeModule(java.lang.Class)"><!-- --></A><H3> removeModule</H3> <PRE> public boolean <B>removeModule</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Class.html">Class</A> module)</PRE> <DL> <DD>Removes a module from the current list. If the module is not in the list it does nothing.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>module</CODE> - the module's Class object<DT><B>Returns:</B><DD>true if module was successfully removed; false otherwise</DL> </DD> </DL> <HR> <A NAME="setContext(java.lang.Object)"><!-- --></A><H3> setContext</H3> <PRE> public void <B>setContext</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> context)</PRE> <DL> <DD>Sets the current context. The context is used by modules such as the AuthorizationModule and the CookieModule which keep lists of info that is normally shared between all instances of HTTPConnection. This is usually the desired behaviour. However, in some cases one would like to simulate multiple independent clients within the same application and hence the sharing of such info should be restricted. This is where the context comes in. Modules will only share their info between requests using the same context (i.e. they keep multiple lists, one for each context). <P>The context may be any object. Contexts are considered equal if <code>equals()</code> returns true. Examples of useful context objects are threads (e.g. if you are running multiple clients, one per thread) and sockets (e.g. if you are implementing a gateway). <P>When a new HTTPConnection is created it is initialized with a default context which is the same for all instances. This method must be invoked immediately after a new HTTPConnection is created and before any request method is invoked. Furthermore, this method may only be called once (i.e. the context is "sticky").<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>context</CODE> - the new context; must be non-null<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/IllegalArgumentException.html">IllegalArgumentException</A> - if <var>context</var> is null<DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/IllegalStateException.html">IllegalStateException</A> - if the context has already been set</DL> </DD> </DL> <HR> <A NAME="getContext()"><!-- --></A><H3> getContext</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> <B>getContext</B>()</PRE> <DL> <DD>Returns the current context.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the current context, or the default context if <code>setContext()</code> hasn't been invoked<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setContext(java.lang.Object)"><CODE>setContext(java.lang.Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="getDefaultContext()"><!-- --></A><H3> getDefaultContext</H3> <PRE> public static <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> <B>getDefaultContext</B>()</PRE> <DL> <DD>Returns the default context.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the default context<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setContext(java.lang.Object)"><CODE>setContext(java.lang.Object)</CODE></A></DL> </DD> </DL> <HR> <A NAME="addDigestAuthorization(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> addDigestAuthorization</H3> <PRE> public void <B>addDigestAuthorization</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> realm, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> user, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> passwd)</PRE> <DL> <DD>Adds an authorization entry for the "digest" authorization scheme to the list. If an entry already exists for the "digest" scheme and the specified realm then it is overwritten. <P>This is a convenience method and just invokes the corresponding method in AuthorizationInfo.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>realm</CODE> - the realm<DD><CODE>user</CODE> - the username<DD><CODE>passw</CODE> - the password<DT><B>See Also: </B><DD><A HREF="../HTTPClient/AuthorizationInfo.html#addDigestAuthorization(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)"><CODE>AuthorizationInfo.addDigestAuthorization(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="addBasicAuthorization(java.lang.String, java.lang.String, java.lang.String)"><!-- --></A><H3> addBasicAuthorization</H3> <PRE> public void <B>addBasicAuthorization</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> realm, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> user, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> passwd)</PRE> <DL> <DD>Adds an authorization entry for the "basic" authorization scheme to the list. If an entry already exists for the "basic" scheme and the specified realm then it is overwritten. <P>This is a convenience method and just invokes the corresponding method in AuthorizationInfo.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>realm</CODE> - the realm<DD><CODE>user</CODE> - the username<DD><CODE>passw</CODE> - the password<DT><B>See Also: </B><DD><A HREF="../HTTPClient/AuthorizationInfo.html#addBasicAuthorization(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)"><CODE>AuthorizationInfo.addBasicAuthorization(java.lang.String, int, java.lang.String, java.lang.String, java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setProxyServer(java.lang.String, int)"><!-- --></A><H3> setProxyServer</H3> <PRE> public static void <B>setProxyServer</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</PRE> <DL> <DD>Sets the default proxy server to use. The proxy will only be used for new <var>HTTPConnection</var>s created after this call and will not affect currrent instances of <var>HTTPConnection</var>. A null or empty string <var>host</var> parameter disables the proxy. <P>In an application or using the Appletviewer an alternative to this method is to set the following properties (either in the properties file or on the command line): <var>http.proxyHost</var> and <var>http.proxyPort</var>. Whether <var>http.proxyHost</var> is set or not determines whether a proxy server is used. <P>If the proxy server requires authorization and you wish to set this authorization information in the code, then you may use any of the <var>AuthorizationInfo.addXXXAuthorization()</var> methods to do so. Specify the same <var>host</var> and <var>port</var> as in this method. If you have not given any authorization info and the proxy server requires authorization then you will be prompted for the necessary info via a popup the first time you do a request.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host on which the proxy server resides.<DD><CODE>port</CODE> - the port the proxy server is listening on.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setCurrentProxy(java.lang.String, int)"><CODE>setCurrentProxy(java.lang.String, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setCurrentProxy(java.lang.String, int)"><!-- --></A><H3> setCurrentProxy</H3> <PRE> public void <B>setCurrentProxy</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</PRE> <DL> <DD>Sets the proxy used by this instance. This can be used to override the proxy setting inherited from the default proxy setting. A null or empty string <var>host</var> parameter disables the proxy. <P>Note that if you set a proxy for the connection using this method, and a request made over this connection is redirected to a different server, then the connection used for new server will <em>not</em> pick this proxy setting, but instead will use the default proxy settings.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host the proxy runs on<DD><CODE>port</CODE> - the port the proxy is listening on<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setProxyServer(java.lang.String, int)"><CODE>setProxyServer(java.lang.String, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="dontProxyFor(java.lang.String)"><!-- --></A><H3> dontProxyFor</H3> <PRE> public static void <B>dontProxyFor</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host) throws <A HREF="../HTTPClient/ParseException.html">ParseException</A></PRE> <DL> <DD>Add <var>host</var> to the list of hosts which should be accessed directly, not via any proxy set by <code>setProxyServer()</code>. <P>The <var>host</var> may be any of: <UL> <LI>a complete host name (e.g. "www.disney.com") <LI>a domain name; domain names must begin with a dot (e.g. ".disney.com") <LI>an IP-address (e.g. "12.34.56.78") <LI>an IP-subnet, specified as an IP-address and a netmask separated by a "/" (e.g. "34.56.78/255.255.255.192"); a 0 bit in the netmask means that that bit won't be used in the comparison (i.e. the addresses are AND'ed with the netmask before comparison). </UL> <P>The two properties <var>HTTPClient.nonProxyHosts</var> and <var>http.nonProxyHosts</var> are used when this class is loaded to initialize the list of non-proxy hosts. The second property is only read if the first one is not set; the second property is also used the JDK's URLConnection. These properties must contain a "|" separated list of entries which conform to the above rules for the <var>host</var> parameter (e.g. "11.22.33.44|.disney.com").<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - a host name, domain name, IP-address or IP-subnet.<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ParseException.html">ParseException</A> - if the length of the netmask does not match the length of the IP-address</DL> </DD> </DL> <HR> <A NAME="dontProxyFor(java.lang.String[])"><!-- --></A><H3> dontProxyFor</H3> <PRE> public static void <B>dontProxyFor</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A>[] hosts)</PRE> <DL> <DD>Convenience method to add a number of hosts at once. If any one host is null or cannot be parsed it is ignored.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>hosts</CODE> - The list of hosts to set<DT><B>Since: </B><DD>V0.3-2</DD> <DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#dontProxyFor(java.lang.String)"><CODE>dontProxyFor(java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="doProxyFor(java.lang.String)"><!-- --></A><H3> doProxyFor</H3> <PRE> public static boolean <B>doProxyFor</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host) throws <A HREF="../HTTPClient/ParseException.html">ParseException</A></PRE> <DL> <DD>Remove <var>host</var> from the list of hosts for which the proxy should not be used. This modifies the same list that <code>dontProxyFor()</code> uses, i.e. this is used to undo a <code>dontProxyFor()</code> setting. The syntax for <var>host</var> is specified in <code>dontProxyFor()</code>.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - a host name, domain name, IP-address or IP-subnet.<DT><B>Returns:</B><DD>true if the remove was sucessful, false otherwise<DT><B>Throws:</B><DD><A HREF="../HTTPClient/ParseException.html">ParseException</A> - if the length of the netmask does not match the length of the IP-address<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#dontProxyFor(java.lang.String)"><CODE>dontProxyFor(java.lang.String)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setSocksServer(java.lang.String)"><!-- --></A><H3> setSocksServer</H3> <PRE> public static void <B>setSocksServer</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host)</PRE> <DL> <DD>Sets the SOCKS server to use. The server will only be used for new HTTPConnections created after this call and will not affect currrent instances of HTTPConnection. A null or empty string host parameter disables SOCKS. <P>The code will try to determine the SOCKS version to use at connection time. This might fail for a number of reasons, however, in which case you must specify the version explicitly.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host on which the proxy server resides. The port used is the default port 1080.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setSocksServer(java.lang.String, int, int)"><CODE>setSocksServer(java.lang.String, int, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setSocksServer(java.lang.String, int)"><!-- --></A><H3> setSocksServer</H3> <PRE> public static void <B>setSocksServer</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port)</PRE> <DL> <DD>Sets the SOCKS server to use. The server will only be used for new HTTPConnections created after this call and will not affect currrent instances of HTTPConnection. A null or empty string host parameter disables SOCKS. <P>The code will try to determine the SOCKS version to use at connection time. This might fail for a number of reasons, however, in which case you must specify the version explicitly.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host on which the proxy server resides.<DD><CODE>port</CODE> - the port the proxy server is listening on.<DT><B>See Also: </B><DD><A HREF="../HTTPClient/HTTPConnection.html#setSocksServer(java.lang.String, int, int)"><CODE>setSocksServer(java.lang.String, int, int)</CODE></A></DL> </DD> </DL> <HR> <A NAME="setSocksServer(java.lang.String, int, int)"><!-- --></A><H3> setSocksServer</H3> <PRE> public static void <B>setSocksServer</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> host, int port, int version) throws <A HREF="../HTTPClient/SocksException.html">SocksException</A></PRE> <DL> <DD>Sets the SOCKS server to use. The server will only be used for new HTTPConnections created after this call and will not affect currrent instances of HTTPConnection. A null or empty string host parameter disables SOCKS. <P>In an application or using the Appletviewer an alternative to this method is to set the following properties (either in the properties file or on the command line): <var>HTTPClient.socksHost</var>, <var>HTTPClient.socksPort</var> and <var>HTTPClient.socksVersion</var>. Whether <var>HTTPClient.socksHost</var> is set or not determines whether a SOCKS server is used; if <var>HTTPClient.socksPort</var> is not set it defaults to 1080; if <var>HTTPClient.socksVersion</var> is not set an attempt will be made to automatically determine the version used by the server. <P>Note: If you have also set a proxy server then a connection will be made to the SOCKS server, which in turn then makes a connection to the proxy server (possibly via other SOCKS servers), which in turn makes the final connection. <P>If the proxy server is running SOCKS version 5 and requires username/password authorization, and you wish to set this authorization information in the code, then you may use the <var>AuthorizationInfo.addAuthorization()</var> method to do so. Specify the same <var>host</var> and <var>port</var> as in this method, give the <var>scheme</var> "SOCKS5" and the <var>realm</var> "USER/PASS", set the <var>cookie</var> to null and the <var>params</var> to an array containing a single <var>NVPair</var> in turn containing the username and password. Example: <PRE> NVPair[] up = { new NVPair(username, password) }; AuthorizationInfo.addAuthorization(host, port, "SOCKS5", "USER/PASS", null, up); </PRE> If you have not given any authorization info and the proxy server requires authorization then you will be prompted for the necessary info via a popup the first time you do a request.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>host</CODE> - the host on which the proxy server resides.<DD><CODE>port</CODE> - the port the proxy server is listening on.<DD><CODE>version</CODE> - the SOCKS version the server is running. Currently this must be '4' or '5'.<DT><B>Throws:</B><DD><A HREF="../HTTPClient/SocksException.html">SocksException</A> - If <var>version</var> is not '4' or '5'.</DL> </DD> </DL> <HR> <A NAME="setupRequest(java.lang.String, java.lang.String, HTTPClient.NVPair[], byte[], HTTPClient.HttpOutputStream)"><!-- --></A><H3> setupRequest</H3> <PRE> protected final <A HREF="../HTTPClient/HTTPResponse.html">HTTPResponse</A> <B>setupRequest</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> method, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> resource, <A HREF="../HTTPClient/NVPair.html">NVPair</A>[] headers, byte[] entity, <A HREF="../HTTPClient/HttpOutputStream.html">HttpOutputStream</A> stream) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A>, <A HREF="../HTTPClient/ModuleException.html">ModuleException</A></PRE> <DL> <DD>Sets up the request, creating the list of headers to send and creating instances of the modules. This may be invoked by subclasses which add further methods (such as those from DAV and IPP).<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>method</CODE> - GET, POST, etc.<DD><CODE>resource</CODE> - the resource<DD><CODE>headers</CODE> - an array of headers to be used<DD><CODE>entity</CODE> - the entity (or null)<DD><CODE>stream</CODE> - the output stream (or null) - only one of stream and entity may be non-null<DT><B>Returns:</B><DD>the response.<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/IOException.html">IOException</A> - when an exception is returned from the socket.<DD><A HREF="../HTTPClient/ModuleException.html">ModuleException</A> - if an exception is encountered in any module.</DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE> <DL> <DD>Generates a string of the form protocol://host.domain:port .<DD><DL> <DT><B>Overrides:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#toString()">toString</A> in class <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the string</DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/DefaultAuthHandler.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/HttpHeaderElement.html"><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> <A HREF="HTTPConnection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de