fetcher library

Classes

ArchiveFetcher
Provides access to entries of an archive.
BaseBytesResource
BytesResource
Creates a Resource serving ByteArray.
CachingResource
Caches the members of resource on first access, to optimize subsequent accesses.
ContentFilter
Applies a transformation on a Publication resource's DataStream.
ContentFilterPriority
EmptyFetcher
A Fetcher providing no resources at all.
EntryResource
FailureResource
Creates a Resource that will always return the given error.
Fetcher
Provides access to a Resource from a Link.
FileFetcher
FileResource
LazyResource
Wraps a Resource which will be created only when first accessing one of its members.
ProxyResource
A base class for a Resource which acts as a proxy to another one.
Resource
Acts as a proxy to an actual resource by handling read access.
ResourceTry<SuccessT>
Route
RoutingFetcher
Routes requests to child fetchers, depending on a provided predicate.
StringResource
Creates a Resource serving a String.
TransformingFetcher
Transforms the resources' content of a child fetcher using a list of ResourceTransformer functions.
TransformingResource
Transforms the bytes of resource on-the-fly.

Typedefs

ByteDataRetriever = Future<ByteData> Function()
ResourceTransformer = Resource Function(Resource resource)
Implements the transformation of a Resource. It can be used, for example, to decrypt, deobfuscate, inject CSS or JavaScript, correct content – e.g. adding a missing dir="rtl" in an HTML document, pre-process – e.g. before indexing a publication's content, etc.
StringRetriever = Future<String> Function()

Exceptions / Errors

BadRequest
Equivalent to a 400 HTTP error.
ResourceException
Errors occurring while accessing a resource.