org.springframework.aws.ivy
Class S3Resource

java.lang.Object
  extended by 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

Field Summary
private  org.jets3t.service.model.S3Bucket bucket
           
private  long contentLength
           
private  boolean exists
           
private  java.lang.String key
           
private  long lastModified
           
private  java.lang.String name
           
private  org.jets3t.service.S3Service service
           
 
Constructor Summary
S3Resource(org.jets3t.service.S3Service service, java.lang.String uri)
           
 
Method Summary
 org.apache.ivy.plugins.repository.Resource clone(java.lang.String newUri)
           
 boolean exists()
           
 long getContentLength()
           
 long getLastModified()
           
 java.lang.String getName()
           
private  void initalizeResource()
           
private  void initializeS3(java.lang.String uri)
           
 boolean isLocal()
           
 java.io.InputStream openStream()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

S3Resource

public S3Resource(org.jets3t.service.S3Service service,
                  java.lang.String uri)
Method Detail

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