use of com.mendmix.cos.CObjectMetadata in project jeesuite-libs by vakinge.
the class QiniuProvider method getObjectMetadata.
@Override
public CObjectMetadata getObjectMetadata(String bucketName, String fileKey) {
try {
bucketName = buildBucketName(bucketName);
FileInfo stat = bucketManager.stat(bucketName, fileKey);
CObjectMetadata objectMetadata = new CObjectMetadata();
objectMetadata.setCreateTime(new Date(stat.putTime));
objectMetadata.setFilesize(stat.fsize);
objectMetadata.setHash(stat.md5);
objectMetadata.setMimeType(stat.mimeType);
return objectMetadata;
} catch (QiniuException e) {
processQiniuException(bucketName, e);
return null;
}
}
Aggregations