public static class BoxRequestsFile.DownloadThumbnail extends BoxRequest<E,R>
| Modifier and Type | Class and Description |
|---|---|
static class |
com.box.androidsdk.content.requests.BoxRequestDownload.DownloadRequestHandler
A request handler that is designed to handle the parsing logic necessary for a BoxRequestDownload.
|
BoxRequest.BoxRequestHandler<R extends BoxRequest>, BoxRequest.ContentTypes, BoxRequest.Methods| Modifier and Type | Field and Description |
|---|---|
static int |
SIZE_128 |
static int |
SIZE_256 |
static int |
SIZE_32 |
static int |
SIZE_64 |
mBodyMap, mContentType, mHeaderMap, mListener, mQueryMap, mRequestMethod, mRequestUrlString, mSession| Constructor and Description |
|---|
BoxRequestsFile.DownloadThumbnail(java.io.File target,
java.lang.String requestUrl,
BoxSession session)
Creates a download thumbnail to file request with the default parameters
|
BoxRequestsFile.DownloadThumbnail(java.io.OutputStream outputStream,
java.lang.String requestUrl,
BoxSession session)
Creates a download thumbnail to output stream request with the default parameters
|
| Modifier and Type | Method and Description |
|---|---|
long |
getRangeEnd()
Returns the end range for the download.
|
long |
getRangeStart()
Returns the start range for the download.
|
java.io.File |
getTarget()
Returns the target file for the download.
|
java.io.OutputStream |
getTargetStream()
Returns the target output stream for the download.
|
java.lang.String |
getVersion()
If set in this request, the version id of an item to be downloaded.
|
protected void |
logDebug(BoxHttpResponse response) |
R |
setDownloadStartListener(DownloadStartListener listener)
Sets the download start listener for the request.
|
protected void |
setHeaders(com.box.androidsdk.content.requests.BoxHttpRequest request) |
BoxRequestsFile.DownloadThumbnail |
setMaxHeight(int height)
Sets the maximum height for the thumbnail in the request.
|
BoxRequestsFile.DownloadThumbnail |
setMaxWidth(int width)
Sets the maximum width for the thumbnail in the request.
|
BoxRequestsFile.DownloadThumbnail |
setMinHeight(int height)
Sets the minimum height for the thumbnail in the request.
|
BoxRequestsFile.DownloadThumbnail |
setMinSize(int size)
Sets both the minimum height and minimum width for the thumbnail in the request.
|
BoxRequestsFile.DownloadThumbnail |
setMinWidth(int width)
Sets the minimum width for the thumbnail in the request.
|
R |
setProgressListener(ProgressListener listener)
Sets the progress listener for the download request.
|
R |
setRange(long rangeStart,
long rangeEnd)
The portion of a file to download.
|
R |
setVersion(java.lang.String versionId)
Sets the version of the file to download.
|
buildUrl, createHttpRequest, createQuery, getIfMatchEtag, getIfNoneMatchEtag, getRequestHandler, getSession, getStringBody, importRequestContentMapsFrom, logRequest, parseHashMapEntry, parseJsonObject, send, setBody, setContentType, setIfMatchEtag, setIfNoneMatchEtag, setRequestHandler, setTimeOut, toTaskpublic static int SIZE_32
public static int SIZE_64
public static int SIZE_128
public static int SIZE_256
public BoxRequestsFile.DownloadThumbnail(java.io.OutputStream outputStream,
java.lang.String requestUrl,
BoxSession session)
outputStream - output stream to download the thumbnail torequestUrl - URL of the download thumbnail endpointsession - the authenticated session that will be used to make the request withpublic BoxRequestsFile.DownloadThumbnail(java.io.File target,
java.lang.String requestUrl,
BoxSession session)
target - target file to download thumbnail torequestUrl - URL of the download thumbnail endpointsession - the authenticated session that will be used to make the request withpublic BoxRequestsFile.DownloadThumbnail setMinWidth(int width)
width - int for the minimum width.public BoxRequestsFile.DownloadThumbnail setMaxWidth(int width)
width - int for the maximum width.public BoxRequestsFile.DownloadThumbnail setMinHeight(int height)
height - int for the minimum height.public BoxRequestsFile.DownloadThumbnail setMaxHeight(int height)
height - int for the maximum height.public BoxRequestsFile.DownloadThumbnail setMinSize(int size)
size - int for the minimum height and minimum width.protected void setHeaders(com.box.androidsdk.content.requests.BoxHttpRequest request)
setHeaders in class BoxRequest<E extends BoxObject,R extends BoxRequest<E,R>>protected void logDebug(BoxHttpResponse response) throws BoxException
logDebug in class BoxRequest<E extends BoxObject,R extends BoxRequest<E,R>>BoxExceptionpublic java.io.File getTarget()
public java.io.OutputStream getTargetStream()
public long getRangeStart()
public long getRangeEnd()
public R setRange(long rangeStart,
long rangeEnd)
rangeStart - value in bytes from which to begin downloading an item.rangeEnd - value in bytes to end downloading an item.public R setVersion(java.lang.String versionId)
versionId - the version id of an item if a previous version(see file_version field for file) is desired instead of the current.public java.lang.String getVersion()
public R setProgressListener(ProgressListener listener)
listener - progress listener for the download.public R setDownloadStartListener(DownloadStartListener listener)
listener - an optional listener for knowing when the download for this request has started.