-
public final class AssetRetriever
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classAssetRetriever.RetrieveUrlErrorError while trying to retrieve an asset from an URL.
public classAssetRetriever.RetrieveErrorError while trying to retrieve an asset from a Resource or a Container.
-
Constructor Summary
Constructors Constructor Description AssetRetriever(ResourceFactory resourceFactory, ArchiveOpener archiveOpener, FormatSniffer formatSniffer)AssetRetriever(ContentResolver contentResolver, HttpClient httpClient)
-
Method Summary
Modifier and Type Method Description final Try<Asset, AssetRetriever.RetrieveUrlError>retrieve(AbsoluteUrl url, Format format)Retrieves an asset from an url and a known format. final Try<Asset, AssetRetriever.RetrieveError>retrieve(File file, FormatHints formatHints)Retrieves an asset from a local file. final Try<Asset, AssetRetriever.RetrieveUrlError>retrieve(AbsoluteUrl url, FormatHints formatHints)Retrieves an asset from an AbsoluteUrl. final Try<Asset, AssetRetriever.RetrieveUrlError>retrieve(AbsoluteUrl url, MediaType mediaType)Retrieves an asset from an AbsoluteUrl. final Try<Asset, AssetRetriever.RetrieveError>retrieve(File file, MediaType mediaType)Retrieves an asset from a local file. final Try<Asset, AssetRetriever.RetrieveError>retrieve(Resource resource, FormatHints hints)Retrieves an asset from an already opened resource. final Try<Asset, AssetRetriever.RetrieveError>retrieve(Container<Resource> container, FormatHints hints)Retrieves an asset from an already opened container. final Try<Asset, AssetRetriever.RetrieveError>retrieve(Resource resource, MediaType mediaType)Retrieves an asset from an already opened resource. final Try<Asset, AssetRetriever.RetrieveError>retrieve(Container<Resource> container, MediaType mediaType)Retrieves an asset from an already opened container. final Try<Format, AssetRetriever.RetrieveError>sniffFormat(File file, FormatHints hints)Sniffs the format of a file content. final Try<Format, AssetRetriever.RetrieveUrlError>sniffFormat(AbsoluteUrl url, FormatHints hints)Sniffs the format of the content available at url. final Try<Format, AssetRetriever.RetrieveError>sniffFormat(Resource resource, FormatHints hints)Sniffs the format of a resource content. final Try<Format, AssetRetriever.RetrieveError>sniffFormat(Container<Resource> container, FormatHints hints)Sniffs the format of a container content. -
-
Constructor Detail
-
AssetRetriever
AssetRetriever(ResourceFactory resourceFactory, ArchiveOpener archiveOpener, FormatSniffer formatSniffer)
-
AssetRetriever
AssetRetriever(ContentResolver contentResolver, HttpClient httpClient)
-
-
Method Detail
-
retrieve
final Try<Asset, AssetRetriever.RetrieveUrlError> retrieve(AbsoluteUrl url, Format format)
Retrieves an asset from an url and a known format.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(File file, FormatHints formatHints)
Retrieves an asset from a local file.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveUrlError> retrieve(AbsoluteUrl url, FormatHints formatHints)
Retrieves an asset from an AbsoluteUrl.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveUrlError> retrieve(AbsoluteUrl url, MediaType mediaType)
Retrieves an asset from an AbsoluteUrl.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(File file, MediaType mediaType)
Retrieves an asset from a local file.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(Resource resource, FormatHints hints)
Retrieves an asset from an already opened resource.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(Container<Resource> container, FormatHints hints)
Retrieves an asset from an already opened container.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(Resource resource, MediaType mediaType)
Retrieves an asset from an already opened resource.
-
retrieve
final Try<Asset, AssetRetriever.RetrieveError> retrieve(Container<Resource> container, MediaType mediaType)
Retrieves an asset from an already opened container.
-
sniffFormat
final Try<Format, AssetRetriever.RetrieveError> sniffFormat(File file, FormatHints hints)
Sniffs the format of a file content.
-
sniffFormat
final Try<Format, AssetRetriever.RetrieveUrlError> sniffFormat(AbsoluteUrl url, FormatHints hints)
Sniffs the format of the content available at url.
-
sniffFormat
final Try<Format, AssetRetriever.RetrieveError> sniffFormat(Resource resource, FormatHints hints)
Sniffs the format of a resource content.
-
sniffFormat
final Try<Format, AssetRetriever.RetrieveError> sniffFormat(Container<Resource> container, FormatHints hints)
Sniffs the format of a container content.
-
-
-
-