|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.owasp.webscarab.model.Message
org.owasp.webscarab.model.Response
public class Response
Represents a HTTP response as sent by an HTTP server
Field Summary |
---|
Fields inherited from class org.owasp.webscarab.model.Message |
---|
_logger |
Constructor Summary | |
---|---|
Response()
Creates a new instance of Response |
|
Response(Response resp)
Creates a new instance of Response, copied from the supplied Response |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getMessage()
Gets the human readable status message |
Request |
getRequest()
returns the Request that created this Response |
java.lang.String |
getStatus()
Gets the status code of the Response. |
java.lang.String |
getStatusLine()
Returns the status code and human readable status message |
java.lang.String |
getVersion()
returns the HTTP version supported by the server |
void |
parse(java.lang.String string)
parses a Response from the String provided |
void |
parse(java.lang.StringBuffer buff)
Instructs the class to read the headers and content from the supplied StringBuffer N.B. |
void |
read(java.io.InputStream is)
parses the provided InputStream into an HTTP Response. |
void |
setMessage(java.lang.String message)
sets the human-readable status message |
void |
setRequest(Request request)
associates this Response with the provided Request |
void |
setStatus(java.lang.String status)
sets the status code of the response. |
void |
setVersion(java.lang.String version)
Sets the HTTP version supported by the server. |
java.lang.String |
toString()
returns a string containing the response, using the RFC specified CRLF of "\r\n" to separate lines. |
java.lang.String |
toString(java.lang.String crlf)
returns a string containing the response, using the provided string to separate lines. |
void |
write(java.io.OutputStream os)
Writes the Response out to the supplied OutputStream, using the HTTP RFC CRLF value of "\r\n" |
void |
write(java.io.OutputStream os,
java.lang.String crlf)
Writes the Response to the supplied OutputStream, using the provided CRLF value. |
Methods inherited from class org.owasp.webscarab.model.Message |
---|
addHeader, addHeader, deleteHeader, flushContentStream, getContent, getHeader, getHeaderNames, getHeaders, getHeaders, getLine, readLine, setContent, setHeader, setHeader, setHeaders, setNoBody |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Response()
public Response(Response resp)
resp
- The original Response to copyMethod Detail |
---|
public void read(java.io.InputStream is) throws java.io.IOException
read
in class Message
is
- The InputStream to read the Response from
java.io.IOException
- propagated from the InputStreampublic void parse(java.lang.String string) throws java.text.ParseException
string
-
java.text.ParseException
public void parse(java.lang.StringBuffer buff) throws java.text.ParseException
Message
parse
in class Message
buff
-
java.text.ParseException
public void write(java.io.OutputStream os) throws java.io.IOException
write
in class Message
os
-
java.io.IOException
public void write(java.io.OutputStream os, java.lang.String crlf) throws java.io.IOException
write
in class Message
os
- crlf
-
java.io.IOException
public void setVersion(java.lang.String version)
version
- public java.lang.String getVersion()
public void setStatus(java.lang.String status)
status
- public java.lang.String getStatus()
public void setMessage(java.lang.String message)
message
- public java.lang.String getMessage()
public java.lang.String getStatusLine()
public java.lang.String toString()
toString
in class Message
public java.lang.String toString(java.lang.String crlf)
toString
in class Message
crlf
-
public void setRequest(Request request)
request
- public Request getRequest()
public boolean equals(java.lang.Object obj)
equals
in class Message
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |