List of usage examples for com.amazonaws.services.s3.model GeneratePresignedUrlRequest putCustomRequestHeader
public String putCustomRequestHeader(String name, String value)
From source file:org.icgc.dcc.storage.server.repository.s3.S3URLGenerator.java
License:Open Source License
@Override public String getDownloadPartUrl(String bucketName, ObjectKey objectKey, Part part, Date expiration) { GeneratePresignedUrlRequest req = new GeneratePresignedUrlRequest(bucketName, objectKey.getKey(), HttpMethod.GET);/*from ww w.j a v a 2s. co m*/ req.setExpiration(expiration); req.putCustomRequestHeader(HttpHeaders.RANGE, Parts.getHttpRangeValue(part)); return s3Client.generatePresignedUrl(req).toString(); }