public class SimpleStorageResource extends AbstractResource implements 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,
TaskExecutor taskExecutor) |
SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
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, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitwritableChannelgetURI, isFile, isOpen, isReadable, readableChannelpublic SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
TaskExecutor taskExecutor)
public SimpleStorageResource(com.amazonaws.services.s3.AmazonS3 amazonS3,
String bucketName,
String objectName,
TaskExecutor taskExecutor,
String versionId,
String contentType)
public String getDescription()
getDescription in interface Resourcepublic InputStream getInputStream() throws IOException
getInputStream in interface InputStreamSourceIOExceptionpublic boolean exists()
exists in interface Resourceexists in class AbstractResourcepublic long contentLength()
throws IOException
contentLength in interface ResourcecontentLength in class AbstractResourceIOExceptionpublic long lastModified()
throws IOException
lastModified in interface ResourcelastModified in class AbstractResourceIOExceptionpublic String getFilename() throws IllegalStateException
getFilename in interface ResourcegetFilename in class AbstractResourceIllegalStateExceptionpublic URL getURL() throws IOException
getURL in interface ResourcegetURL in class AbstractResourceIOExceptionpublic URI getS3Uri()
public File getFile() throws IOException
getFile in interface ResourcegetFile in class AbstractResourceIOExceptionpublic boolean isWritable()
isWritable in interface WritableResourcepublic OutputStream getOutputStream() throws IOException
getOutputStream in interface WritableResourceIOExceptionpublic SimpleStorageResource createRelative(String relativePath) throws IOException
createRelative in interface ResourcecreateRelative in class AbstractResourceIOExceptionpublic com.amazonaws.services.s3.AmazonS3 getAmazonS3()
Copyright © 2022 Pivotal Software, Inc.. All rights reserved.