|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.baidubce.model.AbstractBceRequest
com.baidubce.services.vod.model.CreateMediaResourceRequest
public class CreateMediaResourceRequest
Uploads a new object to the specified Baidu VOD bucket. The PutObjectRequest optionally uploads object metadata and applies a canned access control policy to the new object.
Baidu VOD never stores partial objects; if during this call an exception wasn't thrown, the entire object was stored.
Constructor Summary | |
---|---|
CreateMediaResourceRequest()
|
Method Summary | |
---|---|
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)
|
Methods inherited from class com.baidubce.model.AbstractBceRequest |
---|
getRequestCredentials, setRequestCredentials |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CreateMediaResourceRequest()
Method Detail |
---|
public AbstractBceRequest withRequestCredentials(BceCredentials credentials)
withRequestCredentials
in class AbstractBceRequest
public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |