|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.prolixtech.jaminid.Response
public class Response
The response class encapsulates an HTTP response. It contains the response data (headers, etc) as well as functions to publish cookies, send files, etc.
Constructor Summary | |
---|---|
Response(int statusCode,
Protocol protocol,
java.io.OutputStream out,
Request masterRequest)
|
Method Summary | |
---|---|
byte[] |
CRLF()
|
void |
publishHeader()
Sends the header to the client. |
void |
sendCookie15DG(java.lang.String name,
java.lang.String value)
sets a fifteen day cookie |
void |
sendFile(java.io.File cFile)
sends a file to the client. |
void |
setCookie(java.lang.String name,
java.lang.String value,
java.lang.String path,
java.util.Date expires)
sets a cookie |
void |
setHeaderLine(ProtocolResponseHeader header,
java.lang.String value)
sets one particular header line |
void |
setStatus(int statusCode)
sets the status of the response to a certain HTTP status code |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Response(int statusCode, Protocol protocol, java.io.OutputStream out, Request masterRequest)
Method Detail |
---|
public void setStatus(int statusCode)
statusCode
- the code to set the status topublic void sendCookie15DG(java.lang.String name, java.lang.String value)
name
- the field namevalue
- the field valuepublic void setCookie(java.lang.String name, java.lang.String value, java.lang.String path, java.util.Date expires)
name
- the field namevalue
- the field vaLUEpath
- the relevant pathexpires
- the cookie activation daypublic void publishHeader() throws java.io.IOException
java.io.IOException
public void setHeaderLine(ProtocolResponseHeader header, java.lang.String value)
header
- value
- public byte[] CRLF()
public void sendFile(java.io.File cFile) throws java.lang.Exception
cFile
- the file to send
java.io.IOException
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |