public class ThumbnailManager
extends java.lang.Object
Constructor and Description |
---|
ThumbnailManager(java.io.File cacheDirectory)
Constructor.
|
ThumbnailManager(java.lang.String cacheDirectoryPath)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deleteFilesInCacheDirectory()
Convenience method to delete all files in the provided cache directory.
|
java.io.File |
getCacheDirectory() |
java.io.File |
getThumbnailForFile(java.lang.String fileId)
Returns a file in a determinate location for the given boxItem.
|
void |
setThumbnailIntoView(ImageView icon,
BoxItem boxItem)
Sets the best known image for given item into the given view.
|
public ThumbnailManager(java.lang.String cacheDirectoryPath) throws java.io.FileNotFoundException
cacheDirectoryPath
- the directory to store thumbnail images.java.io.FileNotFoundException
- thrown if the directory given does not exist and cannot be created.public ThumbnailManager(java.io.File cacheDirectory) throws java.io.FileNotFoundException
cacheDirectory
- a file representing the directory to store thumbnail images.java.io.FileNotFoundException
- thrown if the directory given does not exist and cannot be created.public void setThumbnailIntoView(ImageView icon, BoxItem boxItem)
icon
- view to set image for.boxItem
- the BoxItem used to set the view.public java.io.File getThumbnailForFile(java.lang.String fileId)
fileId
- The id of the box file.public java.io.File getCacheDirectory()
public void deleteFilesInCacheDirectory()