public class AmazonS3FileSystem extends FileSystem
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_QUEUE_SIZE |
static int |
MINIMUM_PART_SIZE |
BUFFER_SIZE, captureElapsedTime, DEFAULT_READ_BUFFER_SIZEid, log, name, TIMESTAMP_FORMAT| Constructor and Description |
|---|
AmazonS3FileSystem()
Constructs an Amazon S3 file system instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the Amazon S3 connection.
|
AmazonS3 |
getClient() |
AWSCredentials |
getCredentials() |
AWSCredentialsProvider |
getCredentialsProvider() |
EndpointConfiguration |
getEndpointConfiguration() |
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 |
setClient(AmazonS3 client) |
AmazonS3FileSystem |
setCredentials(AWSCredentials credentials) |
AmazonS3FileSystem |
setCredentialsProvider(AWSCredentialsProvider credentialsProvider) |
AmazonS3FileSystem |
setDebug(boolean debug) |
AmazonS3FileSystem |
setEndpointConfiguration(EndpointConfiguration endpointConfiguration) |
AmazonS3FileSystem |
setProfileCredentialsProvider() |
OutputStream |
writeMultipartFile(InitiateMultipartUploadRequest request) |
OutputStream |
writeMultipartFile(String bucket,
String filePath) |
addElapsedtime, addExceptionProperties, assertClosed, assertNotOpened, assertOpened, finalize, getClosedOn, getDescription, getElapsedTime, getElapsedTimeAsString, getNestedEndpoint, getOpenedOn, getOpenElapsedTime, getOpenElapsedTimeAsString, getRootEndpoint, getSelfTime, getSelfTimeAsString, getState, isCaptureElapsedTime, isClosed, isOpen, setCaptureElapsedTime, setDescription, toStringpublic 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 EndpointConfiguration getEndpointConfiguration()
public AmazonS3FileSystem setEndpointConfiguration(EndpointConfiguration endpointConfiguration)
public boolean isDebug()
public AmazonS3FileSystem setDebug(boolean debug)
public void open()
throws DataException
open in class EndpointDataExceptionpublic void close()
throws DataException
close in class EndpointDataExceptionpublic AmazonS3 getClient()
public AmazonS3FileSystem setClient(AmazonS3 client)
public InputStream readFile(String bucket, String filePath)
public OutputStream writeMultipartFile(String bucket, String filePath)
public OutputStream writeMultipartFile(InitiateMultipartUploadRequest request)
public List<Bucket> listBuckets() throws Throwable
Throwablepublic ObjectListing listRootFolder(String bucket) throws Throwable
Throwablepublic ObjectListing listFolder(String bucket, String folder) throws Throwable
ThrowableCopyright (c) 2006-2025 North Concepts Inc. All Rights Reserved.