This API might mesh better with multipart file uploads. Each ByteBuffer written can be mapped to an UploadPartRequest. Closing the channel can complete the upload, and the CompleteMultipartUploadResult returned from the S3 API can be used to cache file attribute information for the newly uploaded file.
Similarly, asynchronous downloads can be supported here, though I'm not sure on the corresponding APIs in S3.
I had another thought: supporting GatheringByteChannel could also be used to parallelize the upload into chunks as well. This could make it simpler to use with APIs like ByteBuf in Netty.
This API might mesh better with multipart file uploads. Each ByteBuffer written can be mapped to an UploadPartRequest. Closing the channel can complete the upload, and the CompleteMultipartUploadResult returned from the S3 API can be used to cache file attribute information for the newly uploaded file.
Similarly, asynchronous downloads can be supported here, though I'm not sure on the corresponding APIs in S3.