org.springframework.aws.ivy
Class S3Resource
java.lang.Object
org.springframework.aws.ivy.S3Resource
- All Implemented Interfaces:
- org.apache.ivy.plugins.repository.Resource
public class S3Resource
- extends java.lang.Object
- implements org.apache.ivy.plugins.repository.Resource
A Resource implementation that extracts its data from an S3 resource.
- Author:
- Ben Hale
Constructor Summary |
S3Resource(org.jets3t.service.S3Service service,
java.lang.String uri)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
service
private org.jets3t.service.S3Service service
bucket
private org.jets3t.service.model.S3Bucket bucket
key
private java.lang.String key
exists
private boolean exists
contentLength
private long contentLength
lastModified
private long lastModified
name
private java.lang.String name
S3Resource
public S3Resource(org.jets3t.service.S3Service service,
java.lang.String uri)
clone
public org.apache.ivy.plugins.repository.Resource clone(java.lang.String newUri)
- Specified by:
clone
in interface org.apache.ivy.plugins.repository.Resource
exists
public boolean exists()
- Specified by:
exists
in interface org.apache.ivy.plugins.repository.Resource
getContentLength
public long getContentLength()
- Specified by:
getContentLength
in interface org.apache.ivy.plugins.repository.Resource
getLastModified
public long getLastModified()
- Specified by:
getLastModified
in interface org.apache.ivy.plugins.repository.Resource
getName
public java.lang.String getName()
- Specified by:
getName
in interface org.apache.ivy.plugins.repository.Resource
isLocal
public boolean isLocal()
- Specified by:
isLocal
in interface org.apache.ivy.plugins.repository.Resource
openStream
public java.io.InputStream openStream()
throws java.io.IOException
- Specified by:
openStream
in interface org.apache.ivy.plugins.repository.Resource
- Throws:
java.io.IOException
initializeS3
private void initializeS3(java.lang.String uri)
initalizeResource
private void initalizeResource()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object