The zipped file referenced above contains everything you need to build Java source code samples that use the AWS Java SDK to list, upload (including S3 multipart), and download objects in a Swarm cluster. This requires a Content Gateway with the S3 port enabled.
You can change the mainClass in pom.xml to run S3Sample, LowLevel_LargeObjectCopy, or gui S3TransferProgressSample. TODO: some configuration code needs to be updated to use non-deprecated methods.
These sample programs came from the AWS SDK or documentation. Really the only change needed to use a Swarm domain instead of AWS S3 is the addition of the line:
You might also have to set S3ClientOptions.setPathStyleAccess(true) to avoid certificate validation failures. This forces requests to be made to https://mydomain.example.com/mybucket instead of https://mybucket.mydomain.example.com/.
Some samples allow configuration of other options, such as connection timeouts or whether V4 signatures are used (tip: V4 is slower than V2).
The pom.xml specifies the latest 1.11.122 SDK but it should work as far back as 1.9