Class S3Source

java.lang.Object
dev.hardwood.s3.S3Source
All Implemented Interfaces:
Closeable, AutoCloseable

public final class S3Source extends Object implements Closeable

A configured connection to an S3-compatible object store, the source of the files read from it and written to it.

Holds the region, endpoint, credentials (or anonymous access), and HTTP client needed to create S3InputFile instances for reading and S3OutputFile instances for writing. Reuse a single S3Source across multiple files, in either direction, 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}