Buffer the message entity data.
In case the message entity is backed by an unconsumed entity input stream, all the bytes of the original entity input stream are read and stored in a local buffer. The original entity input stream is consumed and automatically closed as part of the operation and the method returns {@code true}.
In case the response entity instance is not backed by an unconsumed input stream an invocation of {@code bufferEntity} method is ignored and the method returns{@code false}.
This operation is idempotent, i.e. it can be invoked multiple times with the same effect which also means that calling the {@code bufferEntity()}method on an already buffered (and thus closed) message instance is legal and has no further effect. Also, the result returned by the {@code bufferEntity()}method is consistent across all invocations of the method on the same {@code Response} instance.
Buffering the message entity data allows for multiple invocations of {@code readEntity(...)} methods on the response instance. Note however, thatonce the response instance itself is {@link #close() closed}, the implementations are expected to release the buffered message entity data too. Therefore any subsequent attempts to read a message entity stream on such closed response will result in an {@link IllegalStateException} being thrown.
@return {@code true} if the message entity input stream was available andwas buffered successfully, returns {@code false} if the entity streamwas not available.
@throws MessageProcessingException if there was an error while buffering the entityinput stream.
@throws IllegalStateException in case the response has been {@link #close() closed}.
@since 2.0