Class DefaultResponse.DefaultResponseBuilder
- java.lang.Object
-
- com.atlassian.httpclient.apache.httpcomponents.DefaultResponse.DefaultResponseBuilder
-
- All Implemented Interfaces:
com.atlassian.httpclient.api.Buildable<com.atlassian.httpclient.api.Response>
,com.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
,com.atlassian.httpclient.api.Response.Builder
- Enclosing class:
- DefaultResponse
public static class DefaultResponse.DefaultResponseBuilder extends Object implements com.atlassian.httpclient.api.Response.Builder
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultResponse
build()
DefaultResponse.DefaultResponseBuilder
setContentCharset(String contentCharset)
DefaultResponse.DefaultResponseBuilder
setContentType(String contentType)
DefaultResponse.DefaultResponseBuilder
setEntity(String entity)
DefaultResponse.DefaultResponseBuilder
setEntityStream(InputStream entityStream)
DefaultResponse.DefaultResponseBuilder
setEntityStream(InputStream entityStream, String encoding)
DefaultResponse.DefaultResponseBuilder
setHeader(String name, String value)
DefaultResponse.DefaultResponseBuilder
setHeaders(Map<String,String> headers)
DefaultResponse.DefaultResponseBuilder
setMaxEntitySize(long maxEntitySize)
DefaultResponse.DefaultResponseBuilder
setStatusCode(int statusCode)
DefaultResponse.DefaultResponseBuilder
setStatusText(String statusText)
-
-
-
Method Detail
-
setContentType
public DefaultResponse.DefaultResponseBuilder setContentType(String contentType)
- Specified by:
setContentType
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setContentType
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setContentCharset
public DefaultResponse.DefaultResponseBuilder setContentCharset(String contentCharset)
- Specified by:
setContentCharset
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setContentCharset
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setHeaders
public DefaultResponse.DefaultResponseBuilder setHeaders(Map<String,String> headers)
- Specified by:
setHeaders
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setHeaders
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setHeader
public DefaultResponse.DefaultResponseBuilder setHeader(String name, String value)
- Specified by:
setHeader
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setHeader
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setEntity
public DefaultResponse.DefaultResponseBuilder setEntity(String entity)
- Specified by:
setEntity
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setEntity
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setEntityStream
public DefaultResponse.DefaultResponseBuilder setEntityStream(InputStream entityStream, String encoding)
- Specified by:
setEntityStream
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setEntityStream
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setEntityStream
public DefaultResponse.DefaultResponseBuilder setEntityStream(InputStream entityStream)
- Specified by:
setEntityStream
in interfacecom.atlassian.httpclient.api.Common<com.atlassian.httpclient.api.Response.Builder>
- Specified by:
setEntityStream
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setStatusText
public DefaultResponse.DefaultResponseBuilder setStatusText(String statusText)
- Specified by:
setStatusText
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setStatusCode
public DefaultResponse.DefaultResponseBuilder setStatusCode(int statusCode)
- Specified by:
setStatusCode
in interfacecom.atlassian.httpclient.api.Response.Builder
-
setMaxEntitySize
public DefaultResponse.DefaultResponseBuilder setMaxEntitySize(long maxEntitySize)
-
build
public DefaultResponse build()
- Specified by:
build
in interfacecom.atlassian.httpclient.api.Buildable<com.atlassian.httpclient.api.Response>
-
-