Package htsjdk.samtools.util
Class CloserUtil
- java.lang.Object
-
- htsjdk.samtools.util.CloserUtil
-
public class CloserUtil extends Object
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
Constructors Constructor Description CloserUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
close(Object obj)
Calls close() onobj
if it implements Closeablestatic void
close(List<? extends Object> objs)
Calls close() on all elements ofobjs
that implement Closeable
-
-
-
Method Detail
-
close
public static void close(Object obj)
Calls close() onobj
if it implements Closeable- Parameters:
obj
- The potentially closeable object
-
-