Package com.google.android.exoplayer2.testutil

## Class AssetContentProvider

- java.lang.Object
- - android.content.ContentProvider
  - - com.google.android.exoplayer2.testutil.AssetContentProvider

- All Implemented Interfaces:
    `ComponentCallbacks`, `ComponentCallbacks2`, `ContentProvider.PipeDataWriter<Object>`

      public final class AssetContentProvider
      extends ContentProvider
      implements ContentProvider.PipeDataWriter<Object>

  A `ContentProvider` for reading asset data.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class android.content.ContentProvider

      `ContentProvider.CallingIdentity, ContentProvider.PipeDataWriter<T extends Object>`

  - ### Field Summary

    - ### Fields inherited from interface android.content.ComponentCallbacks2

      `TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `AssetContentProvider()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static Uri` | `buildUri​(String filePath, boolean pipeMode)` |
    `int` | `delete​(Uri uri, String selection, String[] selectionArgs)` |
    `String` | `getType​(Uri uri)` |
    `Uri` | `insert​(Uri uri, ContentValues values)` |
    `boolean` | `onCreate()` |
    `AssetFileDescriptor` | `openAssetFile​(Uri uri, String mode)` |
    `Cursor` | `query​(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder)` |
    `int` | `update​(Uri uri, ContentValues values, String selection, String[] selectionArgs)` |
    `void` | `writeDataToPipe​(ParcelFileDescriptor output, Uri uri, String mimeType, Bundle opts, Object args)` |

    - ### Methods inherited from class android.content.ContentProvider

      `applyBatch, applyBatch, attachInfo, bulkInsert, call, call, canonicalize, clearCallingIdentity, delete, dump, getCallingAttributionSource, getCallingAttributionTag, getCallingPackage, getCallingPackageUnchecked, getContext, getPathPermissions, getReadPermission, getStreamTypes, getWritePermission, insert, isTemporary, onCallingPackageChanged, onConfigurationChanged, onLowMemory, onTrimMemory, openAssetFile, openFile, openFile, openFileHelper, openPipeHelper, openTypedAssetFile, openTypedAssetFile, query, query, refresh, requireContext, restoreCallingIdentity, setPathPermissions, setReadPermission, setWritePermission, shutdown, uncanonicalize, update`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AssetContentProvider

          public AssetContentProvider()

  - ### Method Detail

    - #### buildUri

          public static Uri buildUri​(String filePath,
                                     boolean pipeMode)

    - #### onCreate

          public boolean onCreate()

      Specified by:
        `onCreate` in class `ContentProvider`

    - #### query

          public Cursor query​(Uri uri,
                              String[] projection,
                              String selection,
                              String[] selectionArgs,
                              String sortOrder)

      Specified by:
        `query` in class `ContentProvider`

    - #### openAssetFile

          public AssetFileDescriptor openAssetFile​(Uri uri,
                                                   String mode)
                                            throws FileNotFoundException

      Overrides:
        `openAssetFile` in class `ContentProvider`
      Throws:
        `FileNotFoundException`

    - #### getType

          public String getType​(Uri uri)

      Specified by:
        `getType` in class `ContentProvider`

    - #### insert

          public Uri insert​(Uri uri,
                            ContentValues values)

      Specified by:
        `insert` in class `ContentProvider`

    - #### delete

          public int delete​(Uri uri,
                            String selection,
                            String[] selectionArgs)

      Specified by:
        `delete` in class `ContentProvider`

    - #### update

          public int update​(Uri uri,
                            ContentValues values,
                            String selection,
                            String[] selectionArgs)

      Specified by:
        `update` in class `ContentProvider`

    - #### writeDataToPipe

          public void writeDataToPipe​(ParcelFileDescriptor output,
                                      Uri uri,
                                      String mimeType,
                                      @Nullable
                                      Bundle opts,
                                      @Nullable
                                      Object args)

      Specified by:
        `writeDataToPipe` in interface `ContentProvider.PipeDataWriter<Object>`