This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // this is an attempt to create a synchronous InputStream from a call to | |
| // S3AsyncClient#getObject using a blocking queue. | |
| // | |
| // the purpose is to be able to make many S3 operations asynchronously, but | |
| // at the same time be able to pass off some results to threads and into | |
| // code that expects InputStream or Reader, like a Commons CSV. | |
| public class InputStreamResponseTransformer extends InputStream implements AsyncResponseTransformer<GetObjectResponse, InputStream>, Subscriber<ByteBuffer> { | |
| private static final ByteBuffer END_MARKER = ByteBuffer.allocate(0); |
OlderNewer