org.springframework.http.client
Class AbstractBufferingClientHttpRequest
java.lang.Object
org.springframework.http.client.AbstractClientHttpRequest
org.springframework.http.client.AbstractBufferingClientHttpRequest
- All Implemented Interfaces:
- ClientHttpRequest, HttpMessage, HttpOutputMessage, HttpRequest
- Direct Known Subclasses:
- BufferingClientHttpRequestWrapper, CommonsClientHttpRequest, HttpComponentsClientHttpRequest, InterceptingClientHttpRequest, SimpleBufferingClientHttpRequest
abstract class AbstractBufferingClientHttpRequest
- extends AbstractClientHttpRequest
Abstract base for ClientHttpRequest
that buffers output in a byte array before sending it over the wire.
- Since:
- 3.0.6
- Author:
- Arjen Poutsma
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bufferedOutput
private java.io.ByteArrayOutputStream bufferedOutput
AbstractBufferingClientHttpRequest
AbstractBufferingClientHttpRequest()
getBodyInternal
protected java.io.OutputStream getBodyInternal(HttpHeaders headers)
throws java.io.IOException
- Description copied from class:
AbstractClientHttpRequest
- Abstract template method that returns the body.
- Specified by:
getBodyInternal
in class AbstractClientHttpRequest
- Parameters:
headers
- the HTTP headers
- Returns:
- the body output stream
- Throws:
java.io.IOException
executeInternal
protected ClientHttpResponse executeInternal(HttpHeaders headers)
throws java.io.IOException
- Description copied from class:
AbstractClientHttpRequest
- Abstract template method that writes the given headers and content to the HTTP request.
- Specified by:
executeInternal
in class AbstractClientHttpRequest
- Parameters:
headers
- the HTTP headers
- Returns:
- the response object for the executed request
- Throws:
java.io.IOException
executeInternal
protected abstract ClientHttpResponse executeInternal(HttpHeaders headers,
byte[] bufferedOutput)
throws java.io.IOException
- Abstract template method that writes the given headers and content to the HTTP request.
- Parameters:
headers
- the HTTP headersbufferedOutput
- the body content
- Returns:
- the response object for the executed request
- Throws:
java.io.IOException