Package 

Class TransformingResource

  • All Implemented Interfaces:
    org.readium.r2.shared.util.SuspendingCloseable , org.readium.r2.shared.util.data.Readable , org.readium.r2.shared.util.resource.Resource

    
    public abstract class TransformingResource
     implements Resource
                        

    Transforms the bytes of resource on-the-fly.

    If you set cacheBytes to false, consider providing your own implementation of length to avoid unnecessary transformations.

    Warning: The transformation runs on the full content of resource, so it's not appropriate for large resources which can't be held in memory.