Class S3Source
java.lang.Object
dev.hardwood.s3.S3Source
- All Implemented Interfaces:
Closeable, AutoCloseable
A configured connection to an S3-compatible object store.
Holds the region, endpoint, credentials, and HTTP client needed
to create S3InputFile instances. Reuse a single S3Source across
multiple files for connection pooling and credential reuse.
URL styles:
- Virtual-hosted (default):
https://{bucket}.s3.{region}.amazonaws.com/{key} - Path-style (opt-in via
S3Source.Builder.pathStyle):{endpoint}/{bucket}/{key}
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic S3Source.Builderbuilder()Creates a newS3Source.Builder.voidclose()Creates anS3InputFilefrom ans3://bucket/keyURI.Creates anS3InputFilefor the given bucket and key.inputFiles(String... uris) CreatesInputFileinstances froms3://URIs (may span buckets).inputFilesInBucket(String bucket, String... keys) CreatesInputFileinstances for multiple keys in the same bucket.
-
Method Details
-
inputFile
Creates anS3InputFilefor the given bucket and key. -
inputFile
Creates anS3InputFilefrom ans3://bucket/keyURI. -
inputFilesInBucket
-
inputFiles
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
builder
Creates a newS3Source.Builder.
-