Package org.apache.commons.io.channels
Class CloseShieldChannel
java.lang.Object
org.apache.commons.io.channels.CloseShieldChannel
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
EMPTY
-
-
Constructor Details
-
CloseShieldChannel
private CloseShieldChannel()
-
-
Method Details
-
collectChannelInterfaces
-
wrap
Wraps a channel to shield it from being closed.- Type Parameters:
T- A supported channel type.- Parameters:
channel- The underlying channel to shield, notnull.- Returns:
- A proxy that shields
close()and enforces closed semantics on other calls. - Throws:
ClassCastException- ifTis not a supported channel type.NullPointerException- ifchannelisnull.
-