Interface DataRewinder<T>

Type Parameters:
T - The stream like data type that can be rewound.
All Known Implementing Classes:
ByteBufferRewinder, InputStreamRewinder, ParcelFileDescriptorRewinder

public interface DataRewinder<T>
Responsible for rewinding a stream like data types.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
    A factory interface for producing individual DataRewinders.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Called when this rewinder is no longer needed and can be cleaned up.
    Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).
  • Method Details

    • rewindAndGet

      @NonNull T rewindAndGet() throws IOException
      Rewinds the wrapped data back to the beginning and returns the re-wound data (or a wrapper for the re-wound data).
      Returns:
      An object pointing to the wrapped data.
      Throws:
      IOException
    • cleanup

      void cleanup()
      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.