public class BoxFileUploadRequestObject extends BoxDefaultRequestObject
| Modifier and Type | Method and Description |
|---|---|
org.apache.http.HttpEntity |
getEntity()
Get entity, which will be put into request body.
|
BoxFileUploadRequestObject |
setContentMD5(String sha1)
Set the content MD5 in the request.
|
BoxFileUploadRequestObject |
setIfMatch(String etag)
This is for upload new version request only.
|
BoxFileUploadRequestObject |
setListener(IFileTransferListener listener)
Set upload listener.
|
BoxFileUploadRequestObject |
setLocalFileCreatedAt(Date createdAt)
Set the time that the file was locally created.
|
BoxFileUploadRequestObject |
setLocalFileLastModifiedAt(Date modifiedAt)
Set the time that the file was locally last modified.
|
BoxFileUploadRequestObject |
setMultipartMIME(MultipartEntityWithProgressListener mime) |
static BoxFileUploadRequestObject |
uploadFileRequestObject(String parentId,
String fileName,
File file,
IBoxJSONParser parser)
BoxFileUploadRequestObject for upload file request.
|
static BoxFileUploadRequestObject |
uploadFileRequestObject(String parentId,
String fileName,
InputStream inputStream)
BoxFileUploadRequestObject for upload file request.
|
static BoxFileUploadRequestObject |
uploadNewVersionRequestObject(String name,
File file)
BoxFileUploadRequestObject for upload a new version of a file.
|
static BoxFileUploadRequestObject |
uploadNewVersionRequestObject(String name,
InputStream inputStream)
BoxFileUploadRequestObject for upload a new version of a file.
|
addField, addFields, addHeader, addQueryParam, get, getFields, getHeaders, getJSONEntity, getJSONParser, getQueryParams, put, put, put, setJSONParser, setPagepublic static BoxFileUploadRequestObject uploadFileRequestObject(String parentId, String fileName, File file, IBoxJSONParser parser) throws BoxRestException, BoxJSONException
parentId - id of the parent folderfileName - name of the filefile - file to be uploadedBoxRestExceptionBoxJSONExceptionpublic static BoxFileUploadRequestObject uploadFileRequestObject(String parentId, String fileName, InputStream inputStream) throws BoxRestException
parentId - id of the parent folderfileName - name of the fileinputStream - InputStream of the file to be uploadedBoxRestExceptionpublic static BoxFileUploadRequestObject uploadNewVersionRequestObject(String name, File file) throws BoxRestException
name - name of the filefile - file to be uploadedBoxRestException - exceptionpublic static BoxFileUploadRequestObject uploadNewVersionRequestObject(String name, InputStream inputStream) throws BoxRestException
name - name of the fileinputStream - input stream of the file uploaded.BoxRestException - exceptionpublic BoxFileUploadRequestObject setMultipartMIME(MultipartEntityWithProgressListener mime) throws BoxRestException
BoxRestExceptionpublic BoxFileUploadRequestObject setListener(IFileTransferListener listener)
listener - upload listenerpublic BoxFileUploadRequestObject setContentMD5(String sha1)
sha1 - sha1public BoxFileUploadRequestObject setLocalFileCreatedAt(Date createdAt) throws UnsupportedEncodingException
createdAt - UnsupportedEncodingExceptionpublic BoxFileUploadRequestObject setLocalFileLastModifiedAt(Date modifiedAt) throws UnsupportedEncodingException
createdAt - UnsupportedEncodingExceptionpublic BoxFileUploadRequestObject setIfMatch(String etag)
etag - etagpublic org.apache.http.HttpEntity getEntity()
IBoxRequestObjectgetEntity in interface IBoxRequestObjectgetEntity in class BoxDefaultRequestObjectCopyright © 2014. All Rights Reserved.