Class InputStreamRewinder

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

public final class InputStreamRewinder extends Object implements DataRewinder<InputStream>
Implementation for InputStreams that rewinds streams by wrapping them in a buffered stream.
  • Constructor Details

  • Method Details

    • rewindAndGet

      @NonNull public InputStream 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<InputStream>
      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<InputStream>
    • fixMarkLimits

      public void fixMarkLimits()