|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jscape.inet.mime.MimeMessage
com.jscape.inet.http.HttpResponse
public class HttpResponse
Represents an HTTP response as returned by the HTTP server in response to an HTTP request.
Example Usage:
Http http = new Http(); HttpRequest request = new HttpRequest("http://www.myserver.com","GET"); HttpResponse response = http.getResponse(request);
Field Summary |
---|
Fields inherited from interface com.jscape.inet.mime.MimeConstants |
---|
COLON, CR, CRLF, EQUALS, LF, QUESTION_MARK, SEMI_COLON, SPACE, TAB |
Constructor Summary | |
---|---|
HttpResponse(byte[] message)
Creates a new HttpResponse object. |
Method Summary | |
---|---|
int |
getContentLength()
Gets value of Content-Length header in HTTP response representing the total number of bytes in HTTP response |
java.lang.String |
getContentType()
Gets value of Content-Type header in HTTP response |
java.util.Enumeration |
getCookies()
Gets all cookies sent back by HTTP server. |
java.util.Date |
getDate()
Gets Date header from HTTP response representing the date the response was issued. |
java.util.Date |
getExpires()
Gets the Expires header from HTTP response representing the date the content is set to expire for caching purposes. |
java.lang.String |
getHttpVersion()
Gets HTTP version sent in response. |
java.util.Date |
getLastModified()
Gets Last-Modified header from HTTP response representing the date the content received was last modified. |
int |
getResponseCode()
Gets response code returned in HTTP response. |
Methods inherited from class com.jscape.inet.mime.MimeMessage |
---|
addHeader, addHeader, addPart, addReplaceHeader, addReplaceHeader, getBody, getBodyAsFile, getBodyData, getBoundary, getContentTransferEncoding, getHeader, getHeaders, getHeaders, getHeaderValue, getMessage, getPart, getParts, getRawBodyData, removeHeader, removePart, removeParts, setBody, setBody, setBody, setBody, setBodyAsFile, setContentType |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpResponse(byte[] message) throws MimeException
message
- the contents of the HTTP response
MimeException
- if a MIME related parsing error occursMethod Detail |
---|
public int getResponseCode()
public java.lang.String getHttpVersion()
public int getContentLength()
public java.lang.String getContentType()
getContentType
in class MimeMessage
public java.util.Date getLastModified()
public java.util.Date getDate()
public java.util.Date getExpires()
public java.util.Enumeration getCookies() throws MimeException
HttpCookie
MimeException
- if an error occurs while parsing HTTP headers
|
Secure iNet Factory | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |