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 Details
-
encode
java.lang.String encode(android.content.Context context, T resource) throws ResourceCreationExceptionFinalizes the preprocess - This method saves the new resource T to a file.- Parameters:
context- Android contextresource- 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
-