gov.llnl.babel.url.cookie
Class Http

java.lang.Object
  extended by gov.llnl.babel.url.cookie.Http

public class Http
extends java.lang.Object


Constructor Summary
Http()
           
 
Method Summary
static void gleanCookies(java.net.HttpURLConnection conn, CookieJar jar)
          Parse cookies found in the Set-Cookie2 header of this Http connection and put any cookies in the given jar.
static void sendCookies(java.net.URLConnection conn, CookieJar jar)
          Add header information containing the relevant cookies to the URLConnection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Http

public Http()
Method Detail

sendCookies

public static void sendCookies(java.net.URLConnection conn,
                               CookieJar jar)
                        throws java.io.IOException
Add header information containing the relevant cookies to the URLConnection. This will add all cookies from jar that should be sent along with conn according to the rules stated in "Http State Management Mechanism" dated August 27, 1999.

Parameters:
conn - a connection to a URL that hasn't yet connected to the server.
jar - a collection of Cookie's.
Throws:
java.io.IOException - when there is I/O there is always the chance of an exception.

gleanCookies

public static void gleanCookies(java.net.HttpURLConnection conn,
                                CookieJar jar)
Parse cookies found in the Set-Cookie2 header of this Http connection and put any cookies in the given jar. This method will reject any cookies that aren't valid considering the source and the rules found in the document "HTTP State Management Mechanism" dated August 27, 1999.