public ParcelFileDescriptor executeForBlobFileDescriptor ( String sql , Object [ ] bindArgs , CancellationSignal cancellationSignal ) { if ( sql == null ) { throw new IllegalArgumentException ( "sql must not be null." ) ; } final int cookie = mRecentOperations . beginOperation ( "executeForBlobFileDescriptor" , sql , bindArgs ) ; try { final PreparedStatement statement = acquirePreparedStatement ( sql ) ; try { throwIfStatementForbidden ( statement ) ; bindArguments ( statement , bindArgs ) ; applyBlockGuardPolicy ( statement ) ; attachCancellationSignal ( cancellationSignal ) ; try { int fd = nativeExecuteForBlobFileDescriptor ( mConnectionPtr , statement . mStatementPtr ) ; return fd >= 0 ? ParcelFileDescriptor . adoptFd ( fd ) : null ; } finally { detachCancellationSignal ( cancellationSignal ) ; } } finally { releasePreparedStatement ( statement ) ; } } catch ( RuntimeException ex ) { mRecentOperations . failOperation ( cookie , ex ) ; throw ex ; } finally { mRecentOperations . endOperation ( cookie ) ; } }
Executes a statement that returns a single BLOB result as a file descriptor to a shared memory region .