public interface S3ClientService extends Service
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
|
void initialize(String server, int port, String accessKey, String secretKey, String appName, String appVersion) throws S3ClientServiceException
server
- servernameport
- portaccessKey
- access keysecretKey
- secret keyappName
- user agent application nameappVersion
- user agent application versionS3ClientServiceException
- if an S3 error occurredboolean bucketExists(String bucket) throws S3ClientServiceException, IOException
bucket
- Bucket nameS3ClientServiceException
- if an S3 error occurredIOException
- if an S3 error occurredS3ClientStat statObject(String bucket, String object) throws S3ClientServiceException, IOException
bucket
- Bucket nameobject
- Object pathS3ClientServiceException
- if an S3 error occurredIOException
- if an S3 error occurredInputStream getObject(String bucket, String object, long offset) throws S3ClientServiceException, IOException
bucket
- Bucket nameobject
- Object pathoffset
- Start reading at this offsetS3ClientServiceException
- if an S3 error occurredIOException
- if an S3 error occurredvoid getObject(String bucket, String object, String filename) throws S3ClientServiceException, IOException
bucket
- Bucket nameobject
- Object pathfilename
- Destination fileS3ClientServiceException
- if an S3 error occurredIOException
- if an S3 error occurredCopyright © 2005–2022 Open Microscopy Environment. All rights reserved.