KIE Remote Services :: Common 6.2.0.Final

org.kie.remote.common.rest
Interface KieRemoteHttpResponse


public interface KieRemoteHttpResponse

Interface that exposes response related functionality of a KieRemoteHttpRequest instance.


Method Summary
 String body()
          Get response as String using character set returned from charset()
 BufferedInputStream buffer()
           
 byte[] bytes()
          Get response as byte array
 String charset()
          Get 'charset' parameter from 'Content-Type' response header
 int code()
           
 String contentEncoding()
          Get the 'Content-Encoding' header from the response
 int contentLength()
          Get the 'Content-Length' header from the response
 String contentType()
          Get the 'Content-Type' header from the response
 String header(String name)
          Get the response header
 String headerParameter(String headerName, String paramName)
           
 Map<String,String> headerParameters(String headerName)
           
 Map<String,List<String>> headers()
           
 String[] headers(String name)
           
 int intHeader(String name)
           
 String message()
           
 InputStream stream()
          Get stream to response body
 

Method Detail

code

int code()
         throws KieRemoteHttpRequestException
Throws:
KieRemoteHttpRequestException

message

String message()
               throws KieRemoteHttpRequestException
Throws:
KieRemoteHttpRequestException

body

String body()
            throws KieRemoteHttpRequestException
Get response as String using character set returned from charset()

Returns:
The content of the response
Throws:
KieRemoteHttpRequestException

bytes

byte[] bytes()
             throws KieRemoteHttpRequestException
Get response as byte array

Returns:
the content of the response in a byte array.
Throws:
KieRemoteHttpRequestException

stream

InputStream stream()
                   throws KieRemoteHttpRequestException
Get stream to response body

Returns:
The InputStream containing the response body content
Throws:
KieRemoteHttpRequestException

buffer

BufferedInputStream buffer()
                           throws KieRemoteHttpRequestException
Throws:
KieRemoteHttpRequestException

header

String header(String name)
              throws KieRemoteHttpRequestException
Get the response header

Parameters:
name - The name of the response header
Returns:
The value of the requested header
Throws:
KieRemoteHttpRequestException

intHeader

int intHeader(String name)
              throws KieRemoteHttpRequestException
Throws:
KieRemoteHttpRequestException

headers

Map<String,List<String>> headers()
                                 throws KieRemoteHttpRequestException
Throws:
KieRemoteHttpRequestException

headers

String[] headers(String name)

headerParameter

String headerParameter(String headerName,
                       String paramName)

headerParameters

Map<String,String> headerParameters(String headerName)

contentEncoding

String contentEncoding()
Get the 'Content-Encoding' header from the response

Returns:
this request

contentType

String contentType()
Get the 'Content-Type' header from the response

Returns:
response header value

contentLength

int contentLength()
Get the 'Content-Length' header from the response

Returns:
response header value

charset

String charset()
Get 'charset' parameter from 'Content-Type' response header

Returns:
charset or null if none

KIE Remote Services :: Common 6.2.0.Final

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.