public class BoxApiPreview
extends BoxApiFile
| Modifier and Type | Class and Description |
|---|---|
static class |
BoxApiPreview.Extensions
Enumeration of all preview supported extensions
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METADATA_FILE_INFO_TAG |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
BoxApiPreview(BoxSession session) |
| Modifier and Type | Method and Description |
|---|---|
BoxRequestsPreview.GetAudioID3Metadata |
getAudioID3MetadataRequest(java.lang.String requestUrl,
BoxSession session,
BoxFile file,
PreviewStorage storage)
Returns a request that retrieves the ID3 metadata from the preview endpoint
|
java.lang.String |
getContentUrl(java.lang.String fileId) |
BoxRequestsPreview.DownloadPreview |
getDownloadPreviewRequest(java.io.OutputStream outputStream,
java.lang.String fileId,
BoxApiPreview.Extensions ext)
Returns a request that retrieves and caches a preview
|
com.box.androidsdk.preview.ext.BoxRequestsPreview.DownloadThumbnail |
getDownloadThumbnailJPGRequest(java.io.OutputStream outputStream,
java.lang.String fileId)
Returns a request that retrieves a JPG thumbnail
|
static BoxRequestsFile.GetFileInfo |
getFileInfoRequest(BoxSession session,
BoxFile fileInfo,
PreviewStorage storage,
BoxApiPreview previewApi)
Returns a request that retrieves file information
|
protected java.lang.String |
getFilesUrl() |
BoxRequestsPreview.PollForConversionReady |
getPollForConversionReadyRequest(java.lang.String fileId,
BoxApiPreview.Extensions ext)
Returns a request that will poll the preview endpoint to check if the conversion of a preview is complete.
|
java.lang.String |
getPreviewUrl(java.lang.String fileId,
BoxApiPreview.Extensions ext) |
java.lang.String |
getThumbnailJPGUrl(java.lang.String fileId) |
public static final java.lang.String METADATA_FILE_INFO_TAG
public static final java.lang.String TAG
protected java.lang.String getFilesUrl()
public java.lang.String getPreviewUrl(java.lang.String fileId,
BoxApiPreview.Extensions ext)
public java.lang.String getContentUrl(java.lang.String fileId)
public java.lang.String getThumbnailJPGUrl(java.lang.String fileId)
public static BoxRequestsFile.GetFileInfo getFileInfoRequest(BoxSession session,
BoxFile fileInfo,
PreviewStorage storage,
BoxApiPreview previewApi)
session - Session to use with the requestfileInfo - The file to get information onstorage - The preview storage used for cachingpublic BoxRequestsPreview.DownloadPreview getDownloadPreviewRequest(java.io.OutputStream outputStream, java.lang.String fileId, BoxApiPreview.Extensions ext)
outputStream - the output stream to cache the preview tofileId - the file id of the preview to retrieveext - extension of the previewpublic com.box.androidsdk.preview.ext.BoxRequestsPreview.DownloadThumbnail getDownloadThumbnailJPGRequest(java.io.OutputStream outputStream,
java.lang.String fileId)
outputStream - output stream to cache the thumnbail tofileId - file id of the thumbnail to retrievepublic BoxRequestsPreview.GetAudioID3Metadata getAudioID3MetadataRequest(java.lang.String requestUrl, BoxSession session, BoxFile file, PreviewStorage storage)
requestUrl - The preview url for the mp3 filesession - The session to use to retrieve the information withfile - The file to retrieve metadata forstorage - The storage class to use for caching the informationpublic BoxRequestsPreview.PollForConversionReady getPollForConversionReadyRequest(java.lang.String fileId, BoxApiPreview.Extensions ext)
fileId - Id of the file to checkext - extension to check preview endpoint with