@@ -356,6 +356,15 @@ static AsyncRequestBody fromRemainingByteBuffersUnsafe(ByteBuffer... byteBuffers
356
356
*
357
357
* <p>An {@link ExecutorService} is required in order to perform the blocking data reads, to prevent blocking the
358
358
* non-blocking event loop threads owned by the SDK.
359
+ *
360
+ * @param inputStream The input stream containing the data to be sent
361
+ * @param contentLength The content length. If a content length smaller than the actual size of the object is set, the client
362
+ * will truncate the stream to the specified content length and only send exactly the number of bytes
363
+ * equal to the content length.
364
+ * @param executor The executor
365
+ *
366
+ * @return An AsyncRequestBody instance for the input stream
367
+ *
359
368
*/
360
369
static AsyncRequestBody fromInputStream (InputStream inputStream , Long contentLength , ExecutorService executor ) {
361
370
return fromInputStream (b -> b .inputStream (inputStream ).contentLength (contentLength ).executor (executor ));
@@ -386,6 +395,7 @@ static AsyncRequestBody fromInputStream(Consumer<AsyncRequestBodyFromInputStream
386
395
*
387
396
* <p>By default, it will time out if streaming hasn't started within 10 seconds, and use application/octet-stream as
388
397
* content type. You can configure it via {@link BlockingInputStreamAsyncRequestBody#builder()}
398
+ *
389
399
* <p><b>Example Usage</b>
390
400
*
391
401
* <p>
@@ -408,6 +418,10 @@ static AsyncRequestBody fromInputStream(Consumer<AsyncRequestBodyFromInputStream
408
418
* // Wait for the service to respond.
409
419
* PutObjectResponse response = responseFuture.join();
410
420
* }
421
+ * @param contentLength The content length. If a content length smaller than the actual size of the object is set, the client
422
+ * will truncate the stream to the specified content length and only send exactly the number of bytes
423
+ * equal to the content length.
424
+ * @return The created {@code BlockingInputStreamAsyncRequestBody}.
411
425
*/
412
426
static BlockingInputStreamAsyncRequestBody forBlockingInputStream (Long contentLength ) {
413
427
return BlockingInputStreamAsyncRequestBody .builder ()
@@ -447,6 +461,11 @@ static BlockingInputStreamAsyncRequestBody forBlockingInputStream(Long contentLe
447
461
* PutObjectResponse response = responseFuture.join();
448
462
* }
449
463
* @see BlockingOutputStreamAsyncRequestBody
464
+ *
465
+ * @param contentLength The content length. If a content length smaller than the actual size of the object is set, the client
466
+ * will truncate the stream to the specified content length and only send exactly the number of bytes
467
+ * equal to the content length.
468
+ * @return The created {@code BlockingOutputStreamAsyncRequestBody}.
450
469
*/
451
470
static BlockingOutputStreamAsyncRequestBody forBlockingOutputStream (Long contentLength ) {
452
471
return BlockingOutputStreamAsyncRequestBody .builder ()
0 commit comments