public class FileUploadParams extends Object
Constructor and Description |
---|
FileUploadParams()
Constructs a new FileUploadParams with default parameters.
|
Modifier and Type | Method and Description |
---|---|
InputStream |
getContent()
Gets the content that will be uploaded to Box.
|
Date |
getCreated()
Gets the content created date that will be given to the uploaded file.
|
String |
getDescription()
Gets the file's description set for uploading.
|
Date |
getModified()
Gets the content modified date that will be given to the uploaded file.
|
String |
getName()
Gets the name that will be given to the uploaded file.
|
ProgressListener |
getProgressListener()
Gets the ProgressListener that will be used for monitoring the upload's progress.
|
String |
getSHA1()
Gets the file's SHA-1 hash.
|
long |
getSize()
Gets the size of the file's content used for monitoring the upload's progress.
|
UploadFileCallback |
getUploadFileCallback() |
FileUploadParams |
setContent(InputStream content)
Sets the content that will be uploaded to Box.
|
FileUploadParams |
setCreated(Date created)
Sets the content created date that will be given to the uploaded file.
|
FileUploadParams |
setDescription(String description)
Sets the file description during the file upload.
|
FileUploadParams |
setModified(Date modified)
Sets the content modified date that will be given to the uploaded file.
|
FileUploadParams |
setName(String name)
Sets the name that will be given to the uploaded file.
|
FileUploadParams |
setProgressListener(ProgressListener listener)
Sets the ProgressListener that will be used for monitoring the upload's progress.
|
FileUploadParams |
setSHA1(String sha1)
Set the SHA-1 hash of the file to ensure it is not corrupted during the upload.
|
FileUploadParams |
setSize(long size)
Sets the size of the file content used for monitoring the upload's progress.
|
FileUploadParams |
setUploadFileCallback(UploadFileCallback uploadFileCallback)
Sets the content writer callback.
|
public FileUploadParams()
public InputStream getContent()
public FileUploadParams setContent(InputStream content)
content
- an InputStream that reads from the content to be uploaded to Box.public UploadFileCallback getUploadFileCallback()
public FileUploadParams setUploadFileCallback(UploadFileCallback uploadFileCallback)
uploadFileCallback
- callback called when file upload starts.public String getName()
public FileUploadParams setName(String name)
name
- the name that will be given to the uploaded file.public Date getCreated()
public FileUploadParams setCreated(Date created)
created
- the content created date that will be given to the uploaded file.public Date getModified()
public FileUploadParams setModified(Date modified)
modified
- the content modified date that will be given to the uploaded file.public long getSize()
public FileUploadParams setSize(long size)
size
- the size of the file's content.public ProgressListener getProgressListener()
public FileUploadParams setProgressListener(ProgressListener listener)
listener
- the listener that will be used for monitoring the upload's progress.public FileUploadParams setSHA1(String sha1)
sha1
- the SHA-1 hash of the file.public String getDescription()
public FileUploadParams setDescription(String description)
description
- the description of the file.