public final class S3Directory extends Object
| Constructor and Description |
|---|
S3Directory(com.amazonaws.services.s3.AmazonS3 s3,
String bucketName,
String rootDirectory) |
| Modifier and Type | Method and Description |
|---|---|
void |
copyObject(S3Directory from,
String fromKey) |
boolean |
deleteAllObjects() |
boolean |
deleteObjects(List<com.amazonaws.services.s3.model.DeleteObjectsRequest.KeyVersion> keys) |
boolean |
doesObjectExist(String name) |
void |
ensureBucket() |
String |
getConfig() |
com.amazonaws.services.s3.model.S3Object |
getObject(String name) |
com.amazonaws.services.s3.model.ObjectMetadata |
getObjectMetadata(String key) |
String |
getPath() |
List<com.amazonaws.services.s3.model.S3ObjectSummary> |
listObjects(String prefix) |
List<String> |
listPrefixes() |
void |
putObject(String name,
InputStream input) |
byte[] |
readObject(String key) |
org.apache.jackrabbit.oak.commons.Buffer |
readObjectToBuffer(String name,
boolean offHeap) |
void |
readObjectToBuffer(String name,
org.apache.jackrabbit.oak.commons.Buffer buffer) |
S3Directory |
withDirectory(String childDirectory) |
void |
writeObject(String name,
byte[] data) |
public S3Directory withDirectory(String childDirectory)
public void ensureBucket()
throws IOException
IOExceptionpublic String getConfig()
public String getPath()
public boolean doesObjectExist(String name)
public com.amazonaws.services.s3.model.S3Object getObject(String name) throws IOException
IOExceptionpublic com.amazonaws.services.s3.model.ObjectMetadata getObjectMetadata(String key)
public org.apache.jackrabbit.oak.commons.Buffer readObjectToBuffer(String name, boolean offHeap) throws IOException
IOExceptionpublic void readObjectToBuffer(String name, org.apache.jackrabbit.oak.commons.Buffer buffer) throws IOException
IOExceptionpublic byte[] readObject(String key) throws IOException
IOExceptionpublic void writeObject(String name, byte[] data) throws IOException
IOExceptionpublic void putObject(String name, InputStream input) throws IOException
IOExceptionpublic void copyObject(S3Directory from, String fromKey) throws IOException
IOExceptionpublic boolean deleteObjects(List<com.amazonaws.services.s3.model.DeleteObjectsRequest.KeyVersion> keys)
public boolean deleteAllObjects()
public List<String> listPrefixes() throws IOException
IOExceptionpublic List<com.amazonaws.services.s3.model.S3ObjectSummary> listObjects(String prefix) throws IOException
IOExceptionCopyright © 2012–2020 The Apache Software Foundation. All rights reserved.