Skip to content

Commit 1edd296

Browse files
authored
Document flush-related behavior of GridFSBucket.downloadToStream (#852)
JAVA-4261
1 parent 3e5992e commit 1edd296

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

driver-sync/src/main/com/mongodb/client/gridfs/GridFSBucket.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -472,15 +472,15 @@ public interface GridFSBucket {
472472
* Downloads the contents of the stored file specified by {@code id} and writes the contents to the {@code destination} Stream.
473473
*
474474
* @param id the ObjectId of the file to be written to the destination stream
475-
* @param destination the destination stream
475+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
476476
*/
477477
void downloadToStream(ObjectId id, OutputStream destination);
478478

479479
/**
480480
* Downloads the contents of the stored file specified by {@code id} and writes the contents to the {@code destination} Stream.
481481
*
482482
* @param id the custom id of the file, to be written to the destination stream
483-
* @param destination the destination stream
483+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
484484
*/
485485
void downloadToStream(BsonValue id, OutputStream destination);
486486

@@ -489,7 +489,7 @@ public interface GridFSBucket {
489489
* the {@code destination} Stream.
490490
*
491491
* @param filename the name of the file to be downloaded
492-
* @param destination the destination stream
492+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
493493
* @since 3.3
494494
*/
495495
void downloadToStream(String filename, OutputStream destination);
@@ -500,7 +500,7 @@ public interface GridFSBucket {
500500
*
501501
* @param filename the name of the file to be downloaded
502502
* @param destination the destination stream
503-
* @param options the download options
503+
* @param options the download options. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
504504
* @since 3.3
505505
*/
506506
void downloadToStream(String filename, OutputStream destination, GridFSDownloadOptions options);
@@ -510,7 +510,7 @@ public interface GridFSBucket {
510510
*
511511
* @param clientSession the client session with which to associate this operation
512512
* @param id the ObjectId of the file to be written to the destination stream
513-
* @param destination the destination stream
513+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
514514
* @since 3.6
515515
* @mongodb.server.release 3.6
516516
*/
@@ -521,7 +521,7 @@ public interface GridFSBucket {
521521
*
522522
* @param clientSession the client session with which to associate this operation
523523
* @param id the custom id of the file, to be written to the destination stream
524-
* @param destination the destination stream
524+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
525525
* @since 3.6
526526
* @mongodb.server.release 3.6
527527
*/
@@ -533,7 +533,7 @@ public interface GridFSBucket {
533533
*
534534
* @param clientSession the client session with which to associate this operation
535535
* @param filename the name of the file to be downloaded
536-
* @param destination the destination stream
536+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
537537
* @since 3.6
538538
* @mongodb.server.release 3.6
539539
*/
@@ -545,7 +545,7 @@ public interface GridFSBucket {
545545
*
546546
* @param clientSession the client session with which to associate this operation
547547
* @param filename the name of the file to be downloaded
548-
* @param destination the destination stream
548+
* @param destination the destination stream. Its {@link OutputStream#flush()} is not guaranteed to be called by this method.
549549
* @param options the download options
550550
* @since 3.6
551551
* @mongodb.server.release 3.6

0 commit comments

Comments
 (0)