-
- All Implemented Interfaces:
-
org.readium.r2.shared.fetcher.Fetcher,org.readium.r2.shared.util.SuspendingCloseable
public final class TransformingFetcher implements Fetcher
Transforms the resources' content of a child fetcher using a list of ResourceTransformer functions.
-
-
Constructor Summary
Constructors Constructor Description TransformingFetcher(Fetcher fetcher, Function1<Resource, Resource> transformer)TransformingFetcher(Fetcher fetcher, List<Function1<Resource, Resource>> transformers)
-
Method Summary
Modifier and Type Method Description List<Link>links()Known resources available in the medium, such as file paths on the file system or entries in a ZIP archive. Resourceget(Link link)Returns the Resource at the given link's HREF. Unitclose()Closes this object and releases any resources associated with it. -
-
Method Detail
-
links
List<Link> links()
Known resources available in the medium, such as file paths on the file system or entries in a ZIP archive. This list is not exhaustive, and additional unknown resources might be reachable.
If the medium has an inherent resource order, it should be followed. Otherwise, HREFs are sorted alphabetically.
-
-
-
-