FileDocCategorySizeDatePackage
MoreCloseables.javaAPI DocAndroid 5.1 API1394Thu Mar 12 22:22:48 GMT 2015com.android.common.io

MoreCloseables

public class MoreCloseables extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidcloseQuietly(android.database.Cursor cursor)
Closes the supplied cursor iff it is not null.

        if (cursor != null) {
            cursor.close();
        }
    
public static voidcloseQuietly(android.content.res.AssetFileDescriptor assetFileDescriptor)
Closes the given file descriptor iff it is not null, ignoring exceptions.

        if (assetFileDescriptor != null) {
            try {
                assetFileDescriptor.close();
            } catch (IOException e) {
                // Ignore exceptions when closing.
            }
        }