Class ParcelFileDescriptorRewinder

java.lang.Object
com.bumptech.glide.load.data.ParcelFileDescriptorRewinder
All Implemented Interfaces:
DataRewinder<ParcelFileDescriptor>

public final class ParcelFileDescriptorRewinder extends Object implements DataRewinder<ParcelFileDescriptor>
Implementation for ParcelFileDescriptors that rewinds file descriptors by seeking to 0.
  • Constructor Details

    • ParcelFileDescriptorRewinder

      @RequiresApi(21) public ParcelFileDescriptorRewinder(ParcelFileDescriptor parcelFileDescriptor)
  • Method Details

    • isSupported

      public static boolean isSupported()
    • rewindAndGet

      @NonNull @RequiresApi(21) public ParcelFileDescriptor rewindAndGet() throws IOException
      Description copied from interface: DataRewinder
      Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).
      Specified by:
      rewindAndGet in interface DataRewinder<ParcelFileDescriptor>
      Returns:
      An object pointing to the wrapped data.
      Throws:
      IOException
    • cleanup

      public void cleanup()
      Description copied from interface: DataRewinder
      Called when this rewinder is no longer needed and can be cleaned up.

      The underlying data may still be in use and should not be closed or invalidated.

      Specified by:
      cleanup in interface DataRewinder<ParcelFileDescriptor>