Skip to content

Add support for non-flushing OutputStream to StreamUtils #36382

@jhoeller

Description

@jhoeller

StreamUtils comes with nonClosing decoration methods already, based on an internal NonClosingOutputStream class which suppresses close() calls. We can easily add support for a nonFlushing method, applying an internal subclass of NonClosingOutputStream that also suppresses flush() calls. Also, we can detect whether a given OutputStream is non-closing/flushing already and avoid unnecessary decoration in that case.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions