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) |
Modifier and Type | Method and Description |
---|---|
long |
contentLength() |
SimpleStorageResource |
createRelative(String relativePath) |
boolean |
exists() |
String |
getDescription() |
File |
getFile() |
String |
getFilename() |
InputStream |
getInputStream() |
OutputStream |
getOutputStream() |
URL |
getURL() |
boolean |
isWritable() |
long |
lastModified() |
equals, getFileForLastModifiedCheck, getURI, hashCode, isFile, isOpen, isReadable, readableChannel, toString
public 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.Resource
public InputStream getInputStream() throws IOException
getInputStream
in interface org.springframework.core.io.InputStreamSource
IOException
public boolean exists()
exists
in interface org.springframework.core.io.Resource
exists
in class org.springframework.core.io.AbstractResource
public long contentLength() throws IOException
contentLength
in interface org.springframework.core.io.Resource
contentLength
in class org.springframework.core.io.AbstractResource
IOException
public long lastModified() throws IOException
lastModified
in interface org.springframework.core.io.Resource
lastModified
in class org.springframework.core.io.AbstractResource
IOException
public String getFilename() throws IllegalStateException
getFilename
in interface org.springframework.core.io.Resource
getFilename
in class org.springframework.core.io.AbstractResource
IllegalStateException
public URL getURL() throws IOException
getURL
in interface org.springframework.core.io.Resource
getURL
in class org.springframework.core.io.AbstractResource
IOException
public File getFile() throws IOException
getFile
in interface org.springframework.core.io.Resource
getFile
in class org.springframework.core.io.AbstractResource
IOException
public boolean isWritable()
isWritable
in interface org.springframework.core.io.WritableResource
public OutputStream getOutputStream() throws IOException
getOutputStream
in interface org.springframework.core.io.WritableResource
IOException
public SimpleStorageResource createRelative(String relativePath) throws IOException
createRelative
in interface org.springframework.core.io.Resource
createRelative
in class org.springframework.core.io.AbstractResource
IOException
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.