public class GetSnapshotRequest extends GetObjectRequest
CosXmlRequest.OnRequestWeightListener
cosPath
bucket, noSignHeaders, noSignParams, priority, qCloudTaskStateListener, queryParameters, region, requestHeaders, requestURL, signSourceProvider
构造器和说明 |
---|
GetSnapshotRequest(java.lang.String bucket,
java.lang.String cosPath,
java.lang.String savePath,
java.lang.String fileName,
float time)
预览请求构造器
|
限定符和类型 | 方法和说明 |
---|---|
void |
checkParameters()
sdk 参数校验
|
java.lang.String |
getMethod()
获取HTTP请求方法
RequestMethod |
void |
setFormat(java.lang.String format)
截图的格式,支持 jpg 和 png,默认 jpg
|
void |
setHeight(int height)
截图的高。
|
void |
setMode(java.lang.String mode)
截帧方式
keyframe:截取指定时间点之前的最近的一个关键帧
exactframe:截取指定时间点的帧
默认值为 exactframe
|
void |
setRotate(java.lang.String rotate)
图片旋转方式
auto:按视频旋转信息进行自动旋转
off:不旋转
默认值为 auto
|
void |
setWidth(int width)
截图的宽。
|
getDownloadPath, getFileContentUri, getFileOffset, getProgressListener, getQueryString, getRange, getRspCacheControl, getRspContentDispositon, getRspContentEncoding, getRspContentLanguage, getRspContentType, getRspExpires, getSaveFileName, getSavePath, setFileOffset, setIfMatch, setIfModifiedSince, setIfNONEMatch, setIfUnmodifiedSince, setProgressListener, setRange, setRange, setRspCacheControl, setRspContentDispositon, setRspContentEncoding, setRspContentLanguage, setRspContentType, setRspExpires, setSaveFileName, setSavePath, setTrafficLimit, setVersionId, xmlBuilder
getContentType, getCosPath, getPath, setCosPath, setCOSServerSideEncryption, setCOSServerSideEncryptionWithCustomerKey, setCOSServerSideEncryptionWithKMS
addHeader, addNoSignHeader, addNoSignParams, addQuery, attachMetrics, getBucket, getHttpTask, getKeyTime, getMetrics, getNoSignHeaders, getNoSignParams, getPriority, getQueryEncodedString, getRegion, getRequestBody, getRequestHeaders, getRequestHost, getRequestURL, getSignSourceProvider, getSTSCredentialScope, getWeight, headersHasUnsafeNonAscii, isNeedMD5, isSignInUrl, isSupportAccelerate, isSupportAccelerate, setNeedMD5, setOnRequestWeightListener, setQueryEncodedString, setQueryParameters, setRegion, setRequestHeaders, setRequestHeaders, setRequestHeaders, setRequestURL, setSign, setSign, setSign, setSign, setSign, setSignInUrl, setSignKeyTime, setSignParamsAndHeaders, setSignSourceProvider, setTask, setTaskStateListener
public GetSnapshotRequest(java.lang.String bucket, java.lang.String cosPath, java.lang.String savePath, java.lang.String fileName, float time)
bucket
- 文档所在存储桶cosPath
- 文档的对象键savePath
- 文档本地保存路径fileName
- 本地文件名称time
- 截帧的时间public void setWidth(int width)
width
- 截图的宽public void setHeight(int height)
height
- 截图的高public void setFormat(java.lang.String format)
format
- 截图的格式public void setRotate(java.lang.String rotate)
rotate
- 图片旋转方式public void setMode(java.lang.String mode)
mode
- 截帧方式public void checkParameters() throws CosXmlClientException
CosXmlRequest
checkParameters
在类中 ObjectRequest
CosXmlClientException
- cosXmlClientExceptionpublic java.lang.String getMethod()
CosXmlRequest
RequestMethod
getMethod
在类中 GetObjectRequest