|
Drools :: Eclipse :: Webdav for Guvnor tools 6.0.0.Alpha7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.webdav.internal.kernel.Message
org.eclipse.webdav.internal.kernel.Response
public class Response
The Response class subclasses Message to
add a status field.
| Field Summary | |
|---|---|
protected Status |
status
|
| Fields inherited from class org.eclipse.webdav.internal.kernel.Message |
|---|
body, context |
| Constructor Summary | |
|---|---|
Response(Status status,
IContext context,
Document body)
|
|
Response(Status status,
IContext context,
InputStream body)
|
|
| Method Summary | |
|---|---|
void |
close()
Closes this response. |
Document |
getDocumentBody()
Gets the contents of the response body as a DOM Document. |
InputStream |
getInputStream()
Returns an open input stream for reading the the body of this response. |
int |
getStatusCode()
Return the status code for this response. |
String |
getStatusMessage()
Return the status message for this response. |
boolean |
hasDocumentBody()
Returns whether this response has an XML element as a body; this is the element that would be read if readDocumentBody() was called. |
String |
toString()
|
| Methods inherited from class org.eclipse.webdav.internal.kernel.Message |
|---|
getBody, getContext |
| 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 |
|---|
getContext |
| Field Detail |
|---|
protected Status status
| Constructor Detail |
|---|
public Response(Status status,
IContext context,
InputStream body)
public Response(Status status,
IContext context,
Document body)
| Method Detail |
|---|
public void close()
throws IOException
IResponseThis method should be invoked on every response returned from the server without exception.
close in interface IResponseIOException - if there was a problem closing this
response
public Document getDocumentBody()
throws IOException
IResponseDocument.
This response MUST have an XML body (i.e.,
hasDocumentBody() must return true).
Once the body has been read as an InputStream
it cannot be subsequently read as a Document
(the bytes have been consumed).
If a problem occurs parsing the document body an
IOException is thrown.
getDocumentBody in interface IResponseIOException - if there was a problem receiving the
response or interpreting it as XML.public InputStream getInputStream()
IResponse
This response must not have an XML body (i.e.,
hasElementBody() must return false
).
The client may close the stream early, however, the resulting stream will be closed if necessary when the client closes this response.
getInputStream in interface IResponseInputStream.public int getStatusCode()
Implements the corresponding API in the interface
Response.
getStatusCode in interface IResponsegetStatusCode()public String getStatusMessage()
Implements the corresponding API in the interface
Response.
getStatusMessage in interface IResponsegetStatusMessage()public boolean hasDocumentBody()
IResponsereadDocumentBody() was called.
This method can be called numerous times, and can be called after the body has been read either as an InputStream or a Document -- all with no bad effect.
hasDocumentBody in interface IResponsetrue if this message has a
document body and false otherwise.public String toString()
toString in class Object
|
Drools :: Eclipse :: Webdav for Guvnor tools 6.0.0.Alpha7 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||