org.tranche.httpd
Class GetHandler
java.lang.Object
org.tranche.httpd.AbstractHttpHandler
org.tranche.httpd.GetHandler
- All Implemented Interfaces:
- IFileResources, IHttpHandler
public class GetHandler
- extends AbstractHttpHandler
Handler for HTTP-GET. It is only able to echo back the browser request.
- Author:
- Takis Papoulias
|
Field Summary |
static boolean |
DEBUG
Debug flag reserved for midium level of stdout vebrocity. |
static boolean |
DEBUG_VERBOSE
Debug flag reserver for a higher level of stdout vebrocity. |
static boolean |
ECHO
Flag for debugging an input stream. |
static int |
READ_AHEAD
Size to be used in marking an input stream. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEBUG
public static final boolean DEBUG
- Debug flag reserved for midium level of stdout vebrocity.
- See Also:
- Constant Field Values
DEBUG_VERBOSE
public static final boolean DEBUG_VERBOSE
- Debug flag reserver for a higher level of stdout vebrocity.
- See Also:
- Constant Field Values
ECHO
public static final boolean ECHO
- Flag for debugging an input stream. Usually used to activate a block of code that
marks an input stream.
- See Also:
- Constant Field Values
READ_AHEAD
public static final int READ_AHEAD
- Size to be used in marking an input stream.
- See Also:
- Constant Field Values
GetHandler
public GetHandler()
handle
public void handle()
throws java.io.IOException
- Handles the HTTP request. Usually called by the SocketHandler to handle a GET request.
- Throws:
java.io.IOException
getContentType
public static HttpConstant getContentType(java.lang.String requestName)
get
public static byte[] get(java.lang.String requestName)
throws java.io.IOException
- Throws:
java.io.IOException
This code is free for use both commercially and non-commercially as stated in the project's license