com.limegroup.gnutella.browser
Class HTTPHandler

java.lang.Object
  extended bycom.limegroup.gnutella.browser.HTTPHandler

public class HTTPHandler
extends java.lang.Object

Handle a pure HTTP request


Constructor Summary
HTTPHandler(java.net.Socket socket, java.lang.String line)
           
 
Method Summary
static HTTPHandler create(java.net.Socket socket, java.lang.String line)
          Create and execute the handler without a new thread.
 void handle()
          Handle the request
 void uploadFile(java.io.File apath)
          Read in and return a file.
 void writeError()
          Write out a 404 error.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTTPHandler

public HTTPHandler(java.net.Socket socket,
                   java.lang.String line)
Method Detail

create

public static HTTPHandler create(java.net.Socket socket,
                                 java.lang.String line)
Create and execute the handler without a new thread.


handle

public void handle()
Handle the request


uploadFile

public void uploadFile(java.io.File apath)
Read in and return a file. Note that this is for small files as it reads the whole thing into memory first.


writeError

public void writeError()
Write out a 404 error.