Package com.dropbox.core.v2.files
Class UploadSessionAppendV2Builder
- java.lang.Object
-
- com.dropbox.core.v2.DbxUploadStyleBuilder<java.lang.Void,UploadSessionAppendError,UploadSessionAppendErrorException>
-
- com.dropbox.core.v2.files.UploadSessionAppendV2Builder
-
public class UploadSessionAppendV2Builder extends DbxUploadStyleBuilder<java.lang.Void,UploadSessionAppendError,UploadSessionAppendErrorException>
The request builder returned byDbxUserFilesRequests.uploadSessionAppendV2Builder(com.dropbox.core.v2.files.UploadSessionCursor).Use this class to set optional request parameters and complete the request.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadSessionAppendV2Uploaderstart()Begins the upload request using this builder's request parameters and returns aDbxUploaderfor writing the request body.UploadSessionAppendV2BuilderwithClose(java.lang.Boolean close)Set value for optional field.UploadSessionAppendV2BuilderwithContentHash(java.lang.String contentHash)Set value for optional field.-
Methods inherited from class com.dropbox.core.v2.DbxUploadStyleBuilder
uploadAndFinish, uploadAndFinish, uploadAndFinish, uploadAndFinish
-
-
-
-
Method Detail
-
withClose
public UploadSessionAppendV2Builder withClose(java.lang.Boolean close)
Set value for optional field.If left unset or set to
null, defaults tofalse.- Parameters:
close- If true, the current session will be closed, at which point you won't be able to callDbxUserFilesRequests.uploadSessionAppendV2(UploadSessionCursor)anymore with the current session. Defaults tofalsewhen set tonull.- Returns:
- this builder
-
withContentHash
public UploadSessionAppendV2Builder withContentHash(java.lang.String contentHash)
Set value for optional field.- Parameters:
contentHash- A hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash page. Must have length of at least 64 and have length of at most 64.- Returns:
- this builder
- Throws:
java.lang.IllegalArgumentException- If any argument does not meet its preconditions.
-
start
public UploadSessionAppendV2Uploader start() throws UploadSessionAppendErrorException, DbxException
Description copied from class:DbxUploadStyleBuilderBegins the upload request using this builder's request parameters and returns aDbxUploaderfor writing the request body. Callers can complete the request by writing the upload data to theOutputStreamreturned byDbxUploader.getOutputStream()and receiving the server response usingDbxUploader.finish(). SeeDbxUploadStyleBuilder.uploadAndFinish(java.io.InputStream)convenience method for a simpler way to complete the request.- Specified by:
startin classDbxUploadStyleBuilder<java.lang.Void,UploadSessionAppendError,UploadSessionAppendErrorException>- Returns:
DbxUploaderused to upload data and complete the request- Throws:
DbxException- if an error occursing initializing the requestUploadSessionAppendErrorException
-
-