Interface OutboundMessageContext.StreamProvider
- Enclosing class:
- OutboundMessageContext
public static interface OutboundMessageContext.StreamProvider
The callback interface which is used to get the terminal output stream into which the entity should be
written and to inform the implementation about the entity size.
-
Method Summary
-
Method Details
-
getOutputStream
Get the output stream. This method will be called after all thewriter interceptors
are called and written entity is buffered into the buffer or the buffer exceeds.- Parameters:
contentLength
- the size of the buffered entity or -1 if the entity exceeded the maximum buffer size or if the buffering is disabled.- Returns:
- the adapted output stream into which the serialized entity should be written. May return null
which will cause ignoring the written entity (in that case the entity will
still be written by
message body writers
but the output will be ignored). - Throws:
IOException
- in case of an IO error.
-