Interface ResourceEncoder<T>

Type Parameters:
T - The concrete type this encoder needs to encode

public interface ResourceEncoder<T>
Implement this interface to pass to PreprocessChain.saveWith(ResourceEncoder) for custom resource encoding behavior.
  • Method Summary

    Modifier and Type Method Description
    java.lang.String encode​(android.content.Context context, T resource)
    Finalizes the preprocess - This method saves the new resource T to a file.
  • Method Details

    • encode

      java.lang.String encode​(android.content.Context context, T resource) throws ResourceCreationException
      Finalizes the preprocess - This method saves the new resource T to a file.
      Parameters:
      context - Android context
      resource - The resource (after processing) to save to file.
      Returns:
      The filepath of the newly created file.
      Throws:
      ResourceCreationException - if the processed resource cannot be saved