All Packages Class Hierarchy This Package Previous Next Index
Class com.andthehorseyourodeinon.ghear.Response
java.lang.Object
|
+----com.andthehorseyourodeinon.ghear.Response
- public class Response
- extends Object
Simple data-structure class for HTTP responses.
- Version:
- $Id: Response.java,v 1.1 2000/05/16 22:40:23 samuelg Exp $
-
returnCode
-
-
returnFile
-
-
returnText
-
-
Response(int, String)
- Constructor.
-
Response(int, String, boolean)
- Constructor, with a sneaky way to return a file rather than a message.
-
Response(String)
- Constructor.
-
getCode()
-
-
getLen()
-
-
getText()
-
-
isFile()
-
returnCode
public int returnCode
returnText
public String returnText
returnFile
public boolean returnFile
Response
public Response(String text)
- Constructor.
- Parameters:
- text - the text of the message that's returned to the browser. It's
automatically set to a 200 OK (HTTP_OK) HTTP status code.
Response
public Response(int retCode,
String text)
- Constructor.
- Parameters:
- retCode - the HTTP Status code to be returned. You can get these out of HttpURLConnector,
or manually enter the integer value.
- text - the text of the message that's returned to the browser.
Response
public Response(int retCode,
String filespec,
boolean isFile)
- Constructor, with a sneaky way to return a file rather than a message.
- Parameters:
- retCode - the HTTP Status code to be returned. You can get these out of HttpURLConnector,
or manually enter the integer value.
- filespec - the specification of the file containing the message that's
returned to the browser.
- isFile - if this is set to true, the contents of the file will be returned
to the browser. Otherwise, the filespec will be returned.
getCode
public int getCode()
- Returns:
- an integer containing the HTTP status code.
getLen
public int getLen()
- Returns:
- an integer containing the length of the text to be returned, or the
length of the filespec if a file is to be returned
getText
public String getText()
- Returns:
- a String containing the text to be returned to the browser, or the
name of the file to be returned
isFile
public boolean isFile()
- Returns:
- a boolean. True if the response will return a file to the browser.
All Packages Class Hierarchy This Package Previous Next Index