public class S3ClientServiceImpl extends AbstractService implements S3ClientService
| Constructor and Description |
|---|
S3ClientServiceImpl()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
bucketExists(String bucket)
Check whether a bucket exists
|
InputStream |
getObject(String bucket,
String object,
long offset)
Read an object
|
void |
getObject(String bucket,
String object,
String filename)
Download an object
|
void |
initialize(String server,
int port,
String accessKey,
String secretKey,
String appName,
String appVersion)
Initialise the S3 client
|
S3ClientStat |
statObject(String bucket,
String object)
Stat the object
|
checkClassDependencypublic void initialize(String server, int port, String accessKey, String secretKey, String appName, String appVersion) throws S3ClientServiceException
S3ClientServiceinitialize in interface S3ClientServiceserver - servernameport - portaccessKey - access keysecretKey - secret keyappName - user agent application nameappVersion - user agent application versionS3ClientServiceException - if an S3 error occurredpublic boolean bucketExists(String bucket) throws S3ClientServiceException, IOException
S3ClientServicebucketExists in interface S3ClientServicebucket - Bucket nameS3ClientServiceException - if an S3 error occurredIOException - if an S3 error occurredpublic S3ClientStat statObject(String bucket, String object) throws S3ClientServiceException, IOException
S3ClientServicestatObject in interface S3ClientServicebucket - Bucket nameobject - Object pathS3ClientServiceException - if an S3 error occurredIOException - if an S3 error occurredpublic InputStream getObject(String bucket, String object, long offset) throws S3ClientServiceException, IOException
S3ClientServicegetObject in interface S3ClientServicebucket - Bucket nameobject - Object pathoffset - Start reading at this offsetS3ClientServiceException - if an S3 error occurredIOException - if an S3 error occurredpublic void getObject(String bucket, String object, String filename) throws S3ClientServiceException, IOException
S3ClientServicegetObject in interface S3ClientServicebucket - Bucket nameobject - Object pathfilename - Destination fileS3ClientServiceException - if an S3 error occurredIOException - if an S3 error occurredCopyright © 2005–2024 Open Microscopy Environment. All rights reserved.