OpenBlobForReadResponse


@ExperimentalAppSearchApi
public final class OpenBlobForReadResponse implements Closeable


The response to provide batch operation results of openBlobForReadAsync.

This class is used to retrieve the result of a batch read operation on a collection of blob handles.

The returned android.os.ParcelFileDescriptor must be closed after use to avoid resource leaks. Failing to close the descriptor will result in system resource exhaustion, as each open android.os.ParcelFileDescriptor occupies a limited file descriptor in the system.

Summary

Public methods

void
@NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptor>

Returns the AppSearchBatchResult object containing the results of the read blob for read operation for each AppSearchBlobHandle.

void
writeToParcel(@NonNull Parcel dest, int flags)

To be implemented by child classes.

Constants

CREATOR

Added in 1.1.0-alpha07
public static final @NonNull Parcelable.Creator<OpenBlobForReadResponseCREATOR

Public constructors

Public methods

close

Added in 1.1.0-alpha07
public void close()

getResult

Added in 1.1.0-alpha07
public @NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptorgetResult()

Returns the AppSearchBatchResult object containing the results of the read blob for read operation for each AppSearchBlobHandle.

Returns
@NonNull AppSearchBatchResult<AppSearchBlobHandleParcelFileDescriptor>

A AppSearchBatchResult maps AppSearchBlobHandles which is a unique identifier for a specific blob being committed to the outcome of that read operation. If the operation was successful, the result for that handle is ParcelFileDescriptor; if there was an error, the result contains an AppSearchResult with details of the failure.

writeToParcel

Added in 1.1.0-alpha07
public void writeToParcel(@NonNull Parcel dest, int flags)

To be implemented by child classes.

This is purely for code sync purpose. Have writeToParcel here so we can keep "@Override" in child classes.