| java.lang.Object org.xins.common.service.CallResult org.xins.common.http.HTTPCallResult
HTTPCallResult | public HTTPCallResult(HTTPCallRequest request, TargetDescriptor succeededTarget, long duration, CallExceptionList exceptions, HTTPCallResultData data) throws IllegalArgumentException(Code) | | Constructs a new HTTPCallResult object.
Parameters: request - the call request that resulted in this result, cannot benull . Parameters: succeededTarget - the target for which the call succeeded, cannot be null . Parameters: duration - the call duration in milliseconds, must be a non-negative number. Parameters: exceptions - the list of CallExceptionLists, or null if thefirst call attempt succeeded. Parameters: data - the HTTPCallResultData object returned from the call, cannotbe null . throws: IllegalArgumentException - if request == null|| succeededTarget == null|| data == null|| duration < 0L . since: XINS 1.5.0 |
getData | public byte[] getData()(Code) | | Returns the result data as a byte array. Note that this is not a copy or
clone of the internal data structure, but it is a link to the actual
data structure itself.
a byte array of the result data, never null . |
getStatusCode | public int getStatusCode()(Code) | | Returns the HTTP status code.
the HTTP status code. |
getStream | public InputStream getStream()(Code) | | Returns the returned data as an InputStream . The input
stream is based directly on the underlying byte array.
an InputStream that returns the returned data, nevernull . |
getString | public String getString()(Code) | | Returns the returned data as a String . The encoding
US-ASCII is assumed.
the result data as a text string, not null . |
getString | public String getString(String encoding) throws UnsupportedEncodingException(Code) | | Returns the returned data as a String in the specified
encoding.
Parameters: encoding - the encoding to use in the conversion from bytes to a text string,not null .the result data as a text string, not null . throws: UnsupportedEncodingException - if the specified encoding is not supported. |
|
|