com.limegroup.gnutella.http
Class HTTPRequestMethod

java.lang.Object
  extended by com.limegroup.gnutella.http.HTTPRequestMethod

public abstract class HTTPRequestMethod
extends java.lang.Object

Type-safe enum for HTTP request methods, as specified in RFC 2616. The only required methods for HTTP 1.1 compliance are GET and HEAD.


Field Summary
static HTTPRequestMethod GET
          Constant for the "GET" request method.
static HTTPRequestMethod HEAD
          Constant for the "HEAD" request method.
 
Method Summary
 java.lang.String toString()
           
abstract  void writeHttpResponse(HTTPMessage response, java.io.OutputStream os)
          Abstract method for writing the HTTP response based on the HTTP request method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

GET

public static final HTTPRequestMethod GET
Constant for the "GET" request method.


HEAD

public static final HTTPRequestMethod HEAD
Constant for the "HEAD" request method.

Method Detail

writeHttpResponse

public abstract void writeHttpResponse(HTTPMessage response,
                                       java.io.OutputStream os)
                                throws java.io.IOException
Abstract method for writing the HTTP response based on the HTTP request method.

Parameters:
response - the HTTPMessage instance that handles writing the actual message
os - the OutputStream to write to
Throws:
IOException - if there was an IO error writing the response
NullPointerException - if either the response or the os arguments are null
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object