Class CloseShieldOutput

  • All Implemented Interfaces:
    Output

    public final class CloseShieldOutput
    extends Object
    implements Output
    A decorator of Output that prevents OutputStream to be closed by its performers.

    There is no thread-safety guarantee.

    Since:
    1.0.0
    • Constructor Detail

      • CloseShieldOutput

        public CloseShieldOutput​(Output origin)
        Ctor.
        Parameters:
        origin - Output to preserve.
    • Method Detail

      • stream

        public OutputStream stream()
                            throws Exception
        Description copied from interface: Output
        Get write access to it.
        Specified by:
        stream in interface Output
        Returns:
        OutputStream to write to
        Throws:
        Exception - If something goes wrong