public class AmazonS3FileSystem
extends FileSystem
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_QUEUE_SIZE |
static int |
MINIMUM_PART_SIZE |
Constructor and Description |
---|
AmazonS3FileSystem()
Constructs an Amazon S3 file system instance.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the Amazon S3 connection.
|
AmazonS3Client |
getClient() |
AWSCredentials |
getCredentials() |
AWSCredentialsProvider |
getCredentialsProvider() |
boolean |
isDebug() |
List<Bucket> |
listBuckets()
Returns the buckets owned by the authenticated user.
|
ObjectListing |
listFolder(String bucket,
String folder)
Returns the objects in the specified bucket's folder.
|
ObjectListing |
listRootFolder(String bucket)
Returns the root objects in the specified bucket.
|
ObjectListing |
nextBatch(ObjectListing previousListing)
Returns the next set of paged objects.
|
void |
open()
Opens a connection to the Amazon S3 file system.
|
InputStream |
readFile(String bucket,
String filePath)
Reads the file in the S3 bucket.
|
AmazonS3FileSystem |
setBasicAWSCredentials(String accessKey,
String secretKey) |
AmazonS3FileSystem |
setCredentials(AWSCredentials credentials) |
AmazonS3FileSystem |
setCredentialsProvider(AWSCredentialsProvider credentialsProvider) |
AmazonS3FileSystem |
setDebug(boolean debug) |
AmazonS3FileSystem |
setProfileCredentialsProvider() |
OutputStream |
writeMultipartFile(String bucket,
String filePath) |
public static final int MINIMUM_PART_SIZE
public static final int DEFAULT_QUEUE_SIZE
public AmazonS3FileSystem()
public AWSCredentialsProvider getCredentialsProvider()
public AmazonS3FileSystem setCredentialsProvider(AWSCredentialsProvider credentialsProvider)
public AmazonS3FileSystem setProfileCredentialsProvider()
public AWSCredentials getCredentials()
public AmazonS3FileSystem setCredentials(AWSCredentials credentials)
public AmazonS3FileSystem setBasicAWSCredentials(String accessKey, String secretKey)
public boolean isDebug()
public AmazonS3FileSystem setDebug(boolean debug)
public void open() throws DataException
DataException
public void close() throws DataException
DataException
public AmazonS3Client getClient()
public InputStream readFile(String bucket, String filePath)
public OutputStream writeMultipartFile(String bucket, String filePath)
public List<Bucket> listBuckets() throws Throwable
Throwable
public ObjectListing listRootFolder(String bucket) throws Throwable
Throwable
public ObjectListing listFolder(String bucket, String folder) throws Throwable
Throwable