|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.webdav.http.client.Message
org.eclipse.webdav.http.client.Response
public class Response
An HTTP response message.
Note: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.
Field Summary | |
---|---|
protected Document |
document
|
protected boolean |
hasDocumentBody
|
protected int |
statusCode
|
protected String |
statusMessage
|
Fields inherited from class org.eclipse.webdav.http.client.Message |
---|
bufferPool, context, hasInputStream, inputRead, is |
Constructor Summary | |
---|---|
Response(int statusCode,
String statusMessage,
IContext context,
InputStream inputStream)
Creates a response. |
Method Summary | |
---|---|
long |
getContentLength()
Returns the content length of this message's body, or -1 if the content length is unknown. |
ContentType |
getContentType()
Returns the content type of this response's body, or null
if the content type is unknown. |
Document |
getDocumentBody()
Returns this response's body as a DOM Document . |
int |
getStatusCode()
Returns this response's status code. |
String |
getStatusMessage()
Returns this response's status message. |
boolean |
hasDocumentBody()
Returns a boolean indicating whether this response has a body that can be marshaled to become a DOM Document . |
String |
toString()
|
Methods inherited from class org.eclipse.webdav.http.client.Message |
---|
close, getContext, getInputStream, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.eclipse.webdav.IResponse |
---|
close, getContext, getInputStream |
Field Detail |
---|
protected int statusCode
protected String statusMessage
protected boolean hasDocumentBody
protected Document document
Constructor Detail |
---|
public Response(int statusCode, String statusMessage, IContext context, InputStream inputStream)
context
- the response's header, or null
for an
empty headerinputStream
- an input stream containing the response's body, or
null
for an empty bodystatusCode
- the response's status codestatusMessage
- the response's status messageMethod Detail |
---|
public long getContentLength()
getContentLength
in class Message
public ContentType getContentType()
null
if the content type is unknown.
public Document getDocumentBody() throws IOException
Document
. This
response must have a document body.
getDocumentBody
in interface IResponse
IOException
- if there is an I/O errorpublic int getStatusCode()
getStatusCode
in interface IResponse
public String getStatusMessage()
getStatusMessage
in interface IResponse
public boolean hasDocumentBody()
Document
.
hasDocumentBody
in interface IResponse
Document
Document
public String toString()
toString
in class Message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |