List of usage examples for com.amazonaws.services.s3.model GetObjectRequest setVersionId
public void setVersionId(String versionId)
From source file:org.springframework.cloud.aws.core.io.s3.SimpleStorageResource.java
License:Apache License
@Override public InputStream getInputStream() throws IOException { GetObjectRequest getObjectRequest = new GetObjectRequest(this.bucketName, this.objectName); if (this.versionId != null) { getObjectRequest.setVersionId(this.versionId); }//from w ww . j a v a2 s. com return this.amazonS3.getObject(getObjectRequest).getObjectContent(); }