public class CloseShieldReader extends ProxyReader
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.
Constructor and Description |
---|
CloseShieldReader(Reader in)
Creates a proxy that shields the given reader from being
closed.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Replaces the underlying reader with a
ClosedReader
sentinel. |
mark, markSupported, read, read, read, read, ready, reset, skip
public CloseShieldReader(Reader in)
in
- underlying readerpublic void close()
ClosedReader
sentinel. The original reader will remain open, but this proxy
will appear closed.close
in interface Closeable
close
in interface AutoCloseable
close
in class ProxyReader
Jas4pp 1.5 © Java Analysis Studio for Particle Physics