类 CreateMediaResourceRequest
- java.lang.Object
-
- com.baidubce.model.AbstractBceRequest
-
- com.baidubce.services.vod.model.CreateMediaResourceRequest
-
public class CreateMediaResourceRequest extends AbstractBceRequest
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.
-
-
构造器概要
构造器 构造器 说明 CreateMediaResourceRequest()
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 FilegetFile()Gets the path and name of the file containing the data to be uploaded to Baidu Bos.InputStreamgetInputStream()Gets the input stream containing the data to be uploaded to Baidu Bos.ObjectMetadatagetObjectMetadata()Gets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.voidsetFile(File file)Sets the path and name of the file containing the data to be uploaded to Baidu Bos.voidsetInputStream(InputStream inputStream)Sets the input stream containing the data to be uploaded to Baidu Bos.voidsetObjectMetadata(ObjectMetadata objectMetadata)Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.CreateMediaResourceRequestwithFile(File file)Sets the file containing the data to be uploaded to Baidu Bos.CreateMediaResourceRequestwithInputStream(InputStream inputStream)Sets the input stream containing the data to be uploaded to Baidu Bos.CreateMediaResourceRequestwithObjectMetadata(ObjectMetadata objectMetadata)Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g.AbstractBceRequestwithRequestCredentials(BceCredentials credentials)-
从类继承的方法 com.baidubce.model.AbstractBceRequest
getRequestCredentials, setRequestCredentials
-
-
-
-
方法详细资料
-
withRequestCredentials
public AbstractBceRequest withRequestCredentials(BceCredentials credentials)
- 指定者:
withRequestCredentials在类中AbstractBceRequest
-
getFile
public File getFile()
Gets the path and name of the file 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; both cannot be specified.- 返回:
- The path and name of the file containing the data to be uploaded to Baidu Bos.
-
setFile
public void setFile(File file)
Sets the path and name of the file 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; both cannot be specified.- 参数:
file- The path and name of the file containing the data to be uploaded to Baidu Bos.
-
withFile
public CreateMediaResourceRequest withFile(File file)
Sets the file containing the data to be uploaded to Baidu Bos. Returns this PutObjectRequest, enabling additional method calls to be chained together.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.- 返回:
- This PutObjectRequest, enabling additional method calls to be chained together.
-
getObjectMetadata
public ObjectMetadata getObjectMetadata()
Gets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).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.
- 返回:
- The optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).
-
setObjectMetadata
public void setObjectMetadata(ObjectMetadata objectMetadata)
Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.).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.).
-
withObjectMetadata
public CreateMediaResourceRequest withObjectMetadata(ObjectMetadata objectMetadata)
Sets the optional metadata instructing Baidu Bos how to handle the uploaded data (e.g. custom user metadata, hooks for specifying content type, etc.). Returns this PutObjectRequest, enabling additional method calls to be chained together.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.).- 返回:
- This PutObjectRequest, enabling additional method calls to be chained together.
-
getInputStream
public InputStream getInputStream()
Gets the input stream containing the data to be uploaded to Baidu Bos. The user of this request must either specify a file or an input stream containing the data to be uploaded to Baidu Bos; both cannot be specified.- 返回:
- 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.
-
setInputStream
public void setInputStream(InputStream inputStream)
Sets 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; both cannot be specified.- 参数:
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.
-
withInputStream
public CreateMediaResourceRequest withInputStream(InputStream inputStream)
Sets the input stream containing the data to be uploaded to Baidu Bos. Returns this PutObjectRequest, enabling additional method calls to be chained together.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.- 返回:
- This PutObjectRequest, so that additional method calls can be chained together.
-
-