Class CloseShieldReader

All Implemented Interfaces:
Closeable, AutoCloseable, Readable

public class CloseShieldReader extends ProxyReader
Proxy stream that prevents the underlying reader from being closed.

This class is typically used in cases where a reader needs to be passed to a component that wants to explicitly close the reader even if more input would still be available to other components.

Since:
2.7
  • Constructor Details

    • CloseShieldReader

      Creates a proxy that shields the given reader from being closed.
      Parameters:
      in - underlying reader
  • Method Details