Interface Encoder<T>

Type Parameters:
T - The type of the data that will be written.
All Known Subinterfaces:
ResourceEncoder<T>
All Known Implementing Classes:
BitmapDrawableEncoder, BitmapEncoder, ByteBufferEncoder, GifDrawableEncoder, StreamEncoder

public interface Encoder<T>
An interface for writing data to some persistent data store (i.e. a local File cache).
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    encode(T data, File file, Options options)
    Writes the given data to the given output stream and returns True if the write completed successfully and should be committed.
  • Method Details

    • encode

      boolean encode(@NonNull T data, @NonNull File file, @NonNull Options options)
      Writes the given data to the given output stream and returns True if the write completed successfully and should be committed.
      Parameters:
      data - The data to write.
      file - The file to write the data to.
      options - The set of options to apply when encoding.