Top Description Inners Methods
org.springframework.http

public Interface StreamingHttpOutputMessage

extends HttpOutputMessage
Known Direct Implementers
org.springframework.http.client.AbstractStreamingClientHttpRequest
Imports
java.io.IOException, .OutputStream

Represents an HTTP output message that allows for setting a streaming body. Note that such messages typically do not support getBody() access.
Author
Arjen Poutsma
Since
4.0
See Also
setBody

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
StreamingHttpOutputMessage.Body

Defines the contract for bodies that can be written directly to an OutputStream.

Method Summary

Modifier and TypeMethod and Description
public void
setBody(StreamingHttpOutputMessage.Body
the streaming body callback
body
)

Set the streaming body callback for this message.

Inherited from org.springframework.http.HttpOutputMessage:
getBody

Method Detail

setBodyback to summary
public void setBody(StreamingHttpOutputMessage.Body body)

Set the streaming body callback for this message.

Parameters
body:StreamingHttpOutputMessage.Body

the streaming body callback

org.springframework.http back to summary

public Interface StreamingHttpOutputMessage.Body

Annotations
@FunctionalInterface

Defines the contract for bodies that can be written directly to an OutputStream. Useful with HTTP client libraries that provide indirect access to an OutputStream via a callback mechanism.

Method Summary

Modifier and TypeMethod and Description
public default boolean

Returns:

true if this body can be written repeatedly, false otherwise
repeatable
()

Indicates whether this body is capable of writing its data more than once.

public void
writeTo(OutputStream
the output stream to write to
outputStream
)

Write this body to the given OutputStream.

Method Detail

repeatableback to summary
public default boolean repeatable()

Indicates whether this body is capable of writing its data more than once. The default implementation returns false.

Returns:boolean

true if this body can be written repeatedly, false otherwise

Since
6.1
writeToback to summary
public void writeTo(OutputStream outputStream) throws IOException

Write this body to the given OutputStream.

Parameters
outputStream:OutputStream

the output stream to write to

Exceptions
IOException:
in case of I/O errors