public class SimpleStorageResource
extends org.springframework.core.io.AbstractResource
implements org.springframework.core.io.WritableResource
Resource implementation for
com.amazonaws.services.s3.model.S3Object handles. Implements the extended
WritableResource interface.| Constructor and Description |
|---|
SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
org.springframework.core.task.TaskExecutor taskExecutor) |
SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
org.springframework.core.task.TaskExecutor taskExecutor,
String versionId,
String contentType) |
| Modifier and Type | Method and Description |
|---|---|
long |
contentLength() |
SimpleStorageResource |
createRelative(String relativePath) |
boolean |
exists() |
com.amazonaws.services.s3.AmazonS3 |
getAmazonS3() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
URI |
getS3Uri() |
URL |
getURL() |
boolean |
isWritable() |
long |
lastModified() |
equals, getFileForLastModifiedCheck, getURI, hashCode, isFile, isOpen, isReadable, readableChannel, toStringpublic SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
org.springframework.core.task.TaskExecutor taskExecutor)
public String getDescription()
getDescription in interface org.springframework.core.io.Resourcepublic InputStream getInputStream() throws IOException
getInputStream in interface org.springframework.core.io.InputStreamSourceIOExceptionpublic boolean exists()
exists in interface org.springframework.core.io.Resourceexists in class org.springframework.core.io.AbstractResourcepublic long contentLength()
throws IOException
contentLength in interface org.springframework.core.io.ResourcecontentLength in class org.springframework.core.io.AbstractResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface org.springframework.core.io.ResourcelastModified in class org.springframework.core.io.AbstractResourceIOExceptionpublic String getFilename() throws IllegalStateException
getFilename in interface org.springframework.core.io.ResourcegetFilename in class org.springframework.core.io.AbstractResourceIllegalStateExceptionpublic URL getURL() throws IOException
getURL in interface org.springframework.core.io.ResourcegetURL in class org.springframework.core.io.AbstractResourceIOExceptionpublic URI getS3Uri()
public File getFile() throws IOException
getFile in interface org.springframework.core.io.ResourcegetFile in class org.springframework.core.io.AbstractResourceIOExceptionpublic boolean isWritable()
isWritable in interface org.springframework.core.io.WritableResourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface org.springframework.core.io.WritableResourceIOExceptionpublic SimpleStorageResource createRelative(String relativePath) throws IOException
createRelative in interface org.springframework.core.io.ResourcecreateRelative in class org.springframework.core.io.AbstractResourceIOExceptionpublic com.amazonaws.services.s3.AmazonS3 getAmazonS3()
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.