Example usage for com.amazonaws.services.s3.model ObjectMetadata getSSECustomerKeyMd5

List of usage examples for com.amazonaws.services.s3.model ObjectMetadata getSSECustomerKeyMd5

Introduction

In this page you can find the example usage for com.amazonaws.services.s3.model ObjectMetadata getSSECustomerKeyMd5.

Prototype

@Override
public String getSSECustomerKeyMd5() 

Source Link

Usage

From source file:org.xmlsh.aws.util.AWSS3Command.java

License:BSD License

protected void writeMeta(ObjectMetadata m)
        throws InvalidArgumentException, XMLStreamException, SaxonApiException {

    mLogger.entry(m);/*from   w w  w  .j a  va2  s  .  c om*/
    startElement(sMetaDataElem);

    attribute("cache-control", m.getCacheControl());
    attribute("content-disposition", m.getContentDisposition());
    attribute("content-encoding", m.getContentEncoding());
    attribute("md5", m.getContentMD5());
    attribute("etag", m.getETag());
    attribute("version-id", m.getVersionId());
    attribute("content-length", String.valueOf(m.getContentLength()));
    attribute("last-modified", Util.formatXSDateTime(m.getLastModified()));
    attribute("expiration-time", Util.formatXSDateTime(m.getExpirationTime()));
    attribute("expiration-time-rule-id", m.getExpirationTimeRuleId());
    attribute("httpExpiresDate", Util.formatXSDateTime(m.getHttpExpiresDate()));
    attribute("ongoingRestore", m.getOngoingRestore());
    attribute("restore-expiration-time", Util.formatXSDateTime(m.getRestoreExpirationTime()));
    attribute("instance-length", m.getInstanceLength());
    attribute("sse-algorithm", m.getSSEAlgorithm());
    attribute("sse-aws-kms-key-id", m.getSSEAwsKmsKeyId());
    attribute("sse-customer-algorithm", m.getSSECustomerAlgorithm());
    attribute("sse-customer-key-md5", m.getSSECustomerKeyMd5());
    attribute("storage-class", m.getStorageClass());

    startElement("user-metadata");
    for (Entry<String, String> user : m.getUserMetadata().entrySet()) {
        startElement(sUserMetaDataElem);
        attribute("name", user.getKey());
        attribute("value", user.getValue());
        endElement();

    }
    endElement();
    endElement();

    mLogger.exit();
}