public class CloseShieldInputStream extends ProxyInputStream
This class is typically used in cases where an input stream needs to be passed to a component that wants to explicitly close the stream even if more input would still be available to other components.
in| 构造器和说明 |
|---|
CloseShieldInputStream(InputStream in)
Creates a proxy that shields the given input stream from being
closed.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close()
Replaces the underlying input stream with a
ClosedInputStream
sentinel. |
afterRead, available, beforeRead, handleIOException, mark, markSupported, read, read, read, reset, skippublic CloseShieldInputStream(InputStream in)
in - underlying input streampublic void close()
ClosedInputStream
sentinel. The original input stream will remain open, but this proxy
will appear closed.close 在接口中 Closeableclose 在接口中 AutoCloseableclose 在类中 ProxyInputStream