com.amazonaws.services.s3.model.SSECustomerKey#setAlgorithm ( )源码实例Demo

下面列出了com.amazonaws.services.s3.model.SSECustomerKey#setAlgorithm ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: beam   文件: AwsModule.java
@Override
public SSECustomerKey deserialize(JsonParser parser, DeserializationContext context)
    throws IOException {
  Map<String, String> asMap = parser.readValueAs(new TypeReference<Map<String, String>>() {});

  final String key = asMap.getOrDefault("key", null);
  final String algorithm = asMap.getOrDefault("algorithm", null);
  final String md5 = asMap.getOrDefault("md5", null);
  SSECustomerKey sseCustomerKey = new SSECustomerKey(key);
  if (algorithm != null) {
    sseCustomerKey.setAlgorithm(algorithm);
  }
  if (md5 != null) {
    sseCustomerKey.setMd5(md5);
  }
  return sseCustomerKey;
}