public class CachedMediaFilesManager extends java.lang.Object implements MediaFilesManager
!!! Warning: Cache files are for READ ONLY purpose. Do not modify or delete them!
| Modifier and Type | Class and Description |
|---|---|
static class |
CachedMediaFilesManager.ForbiddenGfycatException
If gfycat.com returned 403 response.
|
| Constructor and Description |
|---|
CachedMediaFilesManager(OkHttpClient videoClient,
DiskCache diskCache) |
| Modifier and Type | Method and Description |
|---|---|
<any> |
loadAsByteArray(Gfycat gfycat,
MediaType mediaType)
Allocates Gfycat media file as byte array into memory.
|
<any> |
loadAsByteArray(Gfycat gfycat,
MediaType mediaType,
ContextDetails contextDetails)
Same as
MediaFilesManager.loadAsByteArray(Gfycat, MediaType), but with ContextDetails for logging purposes. |
<any> |
loadAsFile(Gfycat gfycat,
MediaType mediaType)
Get Gfycat media file.
|
<any> |
loadAsFile(Gfycat gfycat,
MediaType mediaType,
ContextDetails contextDetails)
Same as
MediaFilesManager.loadAsFile(Gfycat, MediaType), but with ContextDetails for logging purposes. |
public CachedMediaFilesManager(OkHttpClient videoClient,
DiskCache diskCache)
public <any> loadAsByteArray(Gfycat gfycat, MediaType mediaType)
MediaFilesManagerLooks for a media file in cache. Downloads and saves it to one if not found.
loadAsByteArray in interface MediaFilesManagergfycat - of media file to get.mediaType - type of media file to get.public <any> loadAsByteArray(Gfycat gfycat, MediaType mediaType, ContextDetails contextDetails)
MediaFilesManagerMediaFilesManager.loadAsByteArray(Gfycat, MediaType), but with ContextDetails for logging purposes.loadAsByteArray in interface MediaFilesManagerpublic <any> loadAsFile(Gfycat gfycat, MediaType mediaType)
MediaFilesManagerLooks for a media file in cache. Downloads and saves it to one if not found.
!!! Warning: You MUST NOT modify or delete this file. Treat is as READ ONLY file.
loadAsFile in interface MediaFilesManagergfycat - of media file to get.mediaType - type of media file to get.public <any> loadAsFile(Gfycat gfycat, MediaType mediaType, ContextDetails contextDetails)
MediaFilesManagerMediaFilesManager.loadAsFile(Gfycat, MediaType), but with ContextDetails for logging purposes.loadAsFile in interface MediaFilesManager