Top Description Fields Constructors Methods
org.springframework.http.client

pack-priv abstract Class AbstractBufferingClientHttpRequest

extends AbstractClientHttpRequest
Class Inheritance
Known Direct Subclasses
org.springframework.http.client.BufferingClientHttpRequestWrapper, org.springframework.http.client.InterceptingClientHttpRequest
Imports
java.io.IOException, .OutputStream, org.springframework.http.HttpHeaders, org.springframework.util.FastByteArrayOutputStream

Base implementation of ClientHttpRequest that buffers output in a byte array before sending it over the wire.
Author
Arjen Poutsma
Since
3.0.6

Field Summary

Modifier and TypeField and Description
private final FastByteArrayOutputStream

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected ClientHttpResponse
executeInternal(HttpHeaders
the HTTP headers
headers
)

Implements abstract org.springframework.http.client.AbstractClientHttpRequest.executeInternal.

Abstract template method that writes the given headers and content to the HTTP request.

protected abstract ClientHttpResponse

Returns:

the response object for the executed request
executeInternal
(HttpHeaders
the HTTP headers
headers
,
byte[]
the body content
bufferedOutput
)

Abstract template method that writes the given headers and content to the HTTP request.

protected OutputStream
getBodyInternal(HttpHeaders
the HTTP headers
headers
)

Implements abstract org.springframework.http.client.AbstractClientHttpRequest.getBodyInternal.

Abstract template method that returns the body.

Inherited from org.springframework.http.client.AbstractClientHttpRequest:
assertNotExecutedexecutegetBodygetHeaders

Field Detail

bufferedOutputback to summary
private final FastByteArrayOutputStream bufferedOutput

Constructor Detail

AbstractBufferingClientHttpRequestback to summary
pack-priv AbstractBufferingClientHttpRequest()

Method Detail

executeInternalback to summary
protected ClientHttpResponse executeInternal(HttpHeaders headers) throws IOException

Implements abstract org.springframework.http.client.AbstractClientHttpRequest.executeInternal.

Doc from org.springframework.http.client.AbstractClientHttpRequest.executeInternal.

Abstract template method that writes the given headers and content to the HTTP request.

Parameters
headers:HttpHeaders

the HTTP headers

Returns:ClientHttpResponse

the response object for the executed request

Annotations
@Override
executeInternalback to summary
protected abstract ClientHttpResponse executeInternal(HttpHeaders headers, byte[] bufferedOutput) throws IOException

Abstract template method that writes the given headers and content to the HTTP request.

Parameters
headers:HttpHeaders

the HTTP headers

bufferedOutput:byte[]

the body content

Returns:ClientHttpResponse

the response object for the executed request

getBodyInternalback to summary
protected OutputStream getBodyInternal(HttpHeaders headers) throws IOException

Implements abstract org.springframework.http.client.AbstractClientHttpRequest.getBodyInternal.

Doc from org.springframework.http.client.AbstractClientHttpRequest.getBodyInternal.

Abstract template method that returns the body.

Parameters
headers:HttpHeaders

the HTTP headers

Returns:OutputStream

the body output stream

Annotations
@Override