Package org.apache.hc.core5.io
Class Closer
java.lang.Object
org.apache.hc.core5.io.Closer
Closes resources.
- Since:
- 5.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
Closes the given Closeable in a null-safe manner.static void
close
(ModalCloseable closeable, CloseMode closeMode) Closes the given Closeable in a null-safe manner.static void
closeQuietly
(Closeable closeable) Closes the given Closeable quietly in a null-safe manner even in the event of an exception.
-
Constructor Details
-
Closer
public Closer()
-
-
Method Details
-
close
Closes the given Closeable in a null-safe manner.- Parameters:
closeable
- what to close.- Throws:
IOException
-
close
Closes the given Closeable in a null-safe manner.- Parameters:
closeable
- what to close.closeMode
- How to close the given resource.
-
closeQuietly
Closes the given Closeable quietly in a null-safe manner even in the event of an exception.- Parameters:
closeable
- what to close.
-