public class CreateMediaResourceRequest extends AbstractBceRequest
Baidu VOD never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.
| Constructor and Description |
|---|
CreateMediaResourceRequest() |
| Modifier and Type | Method and Description |
|---|---|
File |
getFile()
Gets the path and name of the file containing the data to be uploaded to Baidu Bos.
|
InputStream |
getInputStream()
Gets the input stream containing the data to be uploaded to Baidu Bos.
|
ObjectMetadata |
getObjectMetadata()
Gets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.
|
void |
setFile(File file)
Sets the path and name of the file containing the data to be uploaded to Baidu Bos.
|
void |
setInputStream(InputStream inputStream)
Sets the input stream containing the data to be uploaded to Baidu Bos.
|
void |
setObjectMetadata(ObjectMetadata objectMetadata)
Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.
|
CreateMediaResourceRequest |
withFile(File file)
Sets the file containing the data to be uploaded to Baidu Bos.
|
CreateMediaResourceRequest |
withInputStream(InputStream inputStream)
Sets the input stream containing the data to be uploaded to Baidu Bos.
|
CreateMediaResourceRequest |
withObjectMetadata(ObjectMetadata objectMetadata)
Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.
|
AbstractBceRequest |
withRequestCredentials(BceCredentials credentials) |
getRequestCredentials, setRequestCredentialspublic AbstractBceRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials in class AbstractBceRequestpublic File getFile()
public void setFile(File file)
file - The path and name of the file containing the data to be uploaded to Baidu Bos.public CreateMediaResourceRequest withFile(File file)
Either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.
file - The file containing the data to be uploaded to Baidu Bos.public ObjectMetadata getObjectMetadata()
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Baidu Bos. This can cause very negative performance impacts.
public void setObjectMetadata(ObjectMetadata objectMetadata)
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Baidu Bos. This can cause very negative performance impacts.
objectMetadata - The optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom
user metadata, hooks for specifying content type, etc.).public CreateMediaResourceRequest withObjectMetadata(ObjectMetadata objectMetadata)
If uploading from an input stream, always specify metadata with the content size set. Otherwise the contents of the input stream have to be buffered in memory before being sent to Baidu Bos. This can cause very negative performance impacts.
objectMetadata - The optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom
user metadata, hooks for specifying content type, etc.).public InputStream getInputStream()
public void setInputStream(InputStream inputStream)
inputStream - The input stream containing the data to be uploaded to Baidu Bos. Either specify a file or an
input stream containing the data to be uploaded to Baidu Bos, not both.public CreateMediaResourceRequest withInputStream(InputStream inputStream)
Either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.
inputStream - The InputStream containing the data to be uploaded to Baidu Bos.Copyright © 2024. All rights reserved.