public class CloseShieldWriter extends ProxyWriter
This class is typically used in cases where a writer needs to be passed to a component that wants to explicitly close the writer even if other components would still use the writer for output.
Constructor and Description |
---|
CloseShieldWriter(Writer out)
Creates a proxy that shields the given writer from being closed.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Replaces the underlying writer with a
ClosedWriter sentinel. |
public CloseShieldWriter(Writer out)
out
- underlying writerpublic void close()
ClosedWriter
sentinel. The original writer will remain open, but
this proxy will appear closed.close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyWriter
Jas4pp 1.5 © Java Analysis Studio for Particle Physics