.withDestinationBucketName(origReq.getDestinationBucketName()) .withDestinationKey(origReq.getDestinationKey()) .withSourceVersionId(origReq.getSourceVersionId()) .withFirstByte(Long.valueOf(offset)) .withLastByte(Long.valueOf(offset + partSize - 1)) .withModifiedSinceConstraint(origReq.getModifiedSinceConstraint()) .withNonmatchingETagConstraints(origReq.getNonmatchingETagConstraints()) .withSourceVersionId(origReq.getSourceVersionId()) .withUnmodifiedSinceConstraint(origReq.getUnmodifiedSinceConstraint())
"/" + SdkHttpUtils.urlEncode(copyObjectRequest.getSourceBucketName(), true) + "/" + SdkHttpUtils.urlEncode(copyObjectRequest.getSourceKey(), true); if (copyObjectRequest.getSourceVersionId() != null) { copySourceHeader += "?versionId=" + copyObjectRequest.getSourceVersionId();
.withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withRequesterPays(copyObjectRequest.isRequesterPays()) .withVersionId(copyObjectRequest.getSourceVersionId());
private void setOtherMetadataInRequest(CopyPartRequest request) { if (copyObjectRequest.getMatchingETagConstraints() != null) request.setMatchingETagConstraints(copyObjectRequest .getMatchingETagConstraints()); if (copyObjectRequest.getModifiedSinceConstraint() != null) request.setModifiedSinceConstraint(copyObjectRequest .getModifiedSinceConstraint()); if (copyObjectRequest.getNonmatchingETagConstraints() != null) request.setNonmatchingETagConstraints(copyObjectRequest .getNonmatchingETagConstraints()); if (copyObjectRequest.getSourceVersionId() != null) request.setSourceVersionId(copyObjectRequest.getSourceVersionId()); if (copyObjectRequest.getUnmodifiedSinceConstraint() != null) request.setUnmodifiedSinceConstraint(copyObjectRequest .getUnmodifiedSinceConstraint()); }
/** * Constructs a copy part requests and returns it. * * @return Returns a new copy part request */ public synchronized CopyPartRequest getNextCopyPartRequest() { long partSize = Math.min(optimalPartSize, remainingBytes); CopyPartRequest request = new CopyPartRequest() .withSourceBucketName(copyObjectRequest.getSourceBucketName()) .withSourceKey(copyObjectRequest.getSourceKey()) .withUploadId(uploadId) .withPartNumber(partNumber++) .withDestinationBucketName( copyObjectRequest.getDestinationBucketName()) .withDestinationKey(copyObjectRequest.getDestinationKey()) .withSourceVersionId(copyObjectRequest.getSourceVersionId()) .withFirstByte(new Long(offset)) .withLastByte(new Long(offset + partSize - 1)) .withSourceSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withDestinationSSECustomerKey(copyObjectRequest.getDestinationSSECustomerKey()); setOtherMetadataInRequest(request); offset += partSize; remainingBytes -= partSize; return request; }
+ "/" + copyObjectRequest.getSourceKey(); if (copyObjectRequest.getSourceVersionId() != null) { copySourceHeader += "?versionId=" + copyObjectRequest.getSourceVersionId();
private void setOtherMetadataInRequest(CopyPartRequest request) { if (copyObjectRequest.getMatchingETagConstraints() != null) request.setMatchingETagConstraints(copyObjectRequest .getMatchingETagConstraints()); if (copyObjectRequest.getModifiedSinceConstraint() != null) request.setModifiedSinceConstraint(copyObjectRequest .getModifiedSinceConstraint()); if (copyObjectRequest.getNonmatchingETagConstraints() != null) request.setNonmatchingETagConstraints(copyObjectRequest .getNonmatchingETagConstraints()); if (copyObjectRequest.getSourceVersionId() != null) request.setSourceVersionId(copyObjectRequest.getSourceVersionId()); if (copyObjectRequest.getUnmodifiedSinceConstraint() != null) request.setUnmodifiedSinceConstraint(copyObjectRequest .getUnmodifiedSinceConstraint()); }
/** * Constructs a copy part requests and returns it. * * @return Returns a new copy part request */ public synchronized CopyPartRequest getNextCopyPartRequest() { long partSize = Math.min(optimalPartSize, remainingBytes); CopyPartRequest request = new CopyPartRequest() .withSourceBucketName(copyObjectRequest.getSourceBucketName()) .withSourceKey(copyObjectRequest.getSourceKey()) .withUploadId(uploadId) .withPartNumber(partNumber++) .withDestinationBucketName( copyObjectRequest.getDestinationBucketName()) .withDestinationKey(copyObjectRequest.getDestinationKey()) .withSourceVersionId(copyObjectRequest.getSourceVersionId()) .withFirstByte(new Long(offset)) .withLastByte(new Long(offset + partSize - 1)) .withSourceSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withDestinationSSECustomerKey(copyObjectRequest.getDestinationSSECustomerKey()); setOtherMetadataInRequest(request); offset += partSize; remainingBytes -= partSize; return request; }
.withDestinationBucketName(origReq.getDestinationBucketName()) .withDestinationKey(origReq.getDestinationKey()) .withSourceVersionId(origReq.getSourceVersionId()) .withFirstByte(Long.valueOf(offset)) .withLastByte(Long.valueOf(offset + partSize - 1)) .withModifiedSinceConstraint(origReq.getModifiedSinceConstraint()) .withNonmatchingETagConstraints(origReq.getNonmatchingETagConstraints()) .withSourceVersionId(origReq.getSourceVersionId()) .withUnmodifiedSinceConstraint(origReq.getUnmodifiedSinceConstraint())
+ "/" + copyObjectRequest.getSourceKey(); if (copyObjectRequest.getSourceVersionId() != null) { copySourceHeader += "?versionId=" + copyObjectRequest.getSourceVersionId();
"/" + SdkHttpUtils.urlEncode(copyObjectRequest.getSourceBucketName(), true) + "/" + SdkHttpUtils.urlEncode(copyObjectRequest.getSourceKey(), true); if (copyObjectRequest.getSourceVersionId() != null) { copySourceHeader += "?versionId=" + copyObjectRequest.getSourceVersionId();
.withSSECustomerKey(copyObjectRequest.getSourceSSECustomerKey()) .withRequesterPays(copyObjectRequest.isRequesterPays()) .withVersionId(copyObjectRequest.getSourceVersionId());