Package htsjdk.samtools.util
Class CloserUtil
java.lang.Object
htsjdk.samtools.util.CloserUtil
Utility to close things that implement Closeable
WARNING: This should only be used for Closeable things open for read, because it ignores exceptions, and
the caller will probably want to know about exceptions when closing a file being written to, because
this may indicate a failure to flush.
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
CloserUtil
public CloserUtil()
-
-
Method Details
-
close
Calls close() onobj
if it implements Closeable- Parameters:
obj
- The potentially closeable object
-
close
Calls close() on all elements ofobjs
that implement Closeable- Parameters:
objs
- A list of potentially closeable objects NOTE: This method must take a List<? extends Object>, not List
-