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.
in
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. |
afterRead, beforeRead, handleIOException, 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
Copyright © 2002–2020 The Apache Software Foundation. All rights reserved.