How to download files in chunks using google drive api in java? [duplicate]










2
















This question already has an answer here:



  • How to partial download google drive files using java REST Client API?

    2 answers



I am able to download files using google drive api as a single file but I want to download files in chunks of size let's say 5 MB for large files. This is the code for direct downloading.



session.service.files().get(id).executeMediaAndDownloadTo(asOutputStream());









share|improve this question















marked as duplicate by Mark Rotteveel java
Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

StackExchange.ready(function()
if (StackExchange.options.isMobile) return;

$('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
var $hover = $(this).addClass('hover-bound'),
$msg = $hover.siblings('.dupe-hammer-message');

$hover.hover(
function()
$hover.showInfoMessage('',
messageElement: $msg.clone().show(),
transient: false,
position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
dismissable: false,
relativeToBody: true
);
,
function()
StackExchange.helpers.removeMessages();

);
);
);
Nov 16 '18 at 14:55


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






















    2
















    This question already has an answer here:



    • How to partial download google drive files using java REST Client API?

      2 answers



    I am able to download files using google drive api as a single file but I want to download files in chunks of size let's say 5 MB for large files. This is the code for direct downloading.



    session.service.files().get(id).executeMediaAndDownloadTo(asOutputStream());









    share|improve this question















    marked as duplicate by Mark Rotteveel java
    Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

    StackExchange.ready(function()
    if (StackExchange.options.isMobile) return;

    $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
    var $hover = $(this).addClass('hover-bound'),
    $msg = $hover.siblings('.dupe-hammer-message');

    $hover.hover(
    function()
    $hover.showInfoMessage('',
    messageElement: $msg.clone().show(),
    transient: false,
    position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
    dismissable: false,
    relativeToBody: true
    );
    ,
    function()
    StackExchange.helpers.removeMessages();

    );
    );
    );
    Nov 16 '18 at 14:55


    This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.




















      2












      2








      2









      This question already has an answer here:



      • How to partial download google drive files using java REST Client API?

        2 answers



      I am able to download files using google drive api as a single file but I want to download files in chunks of size let's say 5 MB for large files. This is the code for direct downloading.



      session.service.files().get(id).executeMediaAndDownloadTo(asOutputStream());









      share|improve this question

















      This question already has an answer here:



      • How to partial download google drive files using java REST Client API?

        2 answers



      I am able to download files using google drive api as a single file but I want to download files in chunks of size let's say 5 MB for large files. This is the code for direct downloading.



      session.service.files().get(id).executeMediaAndDownloadTo(asOutputStream());




      This question already has an answer here:



      • How to partial download google drive files using java REST Client API?

        2 answers







      java google-drive-sdk






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 20:27









      Kara

      4,024104353




      4,024104353










      asked Nov 15 '18 at 18:08









      Atul SinghAtul Singh

      316




      316




      marked as duplicate by Mark Rotteveel java
      Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Nov 16 '18 at 14:55


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









      marked as duplicate by Mark Rotteveel java
      Users with the  java badge can single-handedly close java questions as duplicates and reopen them as needed.

      StackExchange.ready(function()
      if (StackExchange.options.isMobile) return;

      $('.dupe-hammer-message-hover:not(.hover-bound)').each(function()
      var $hover = $(this).addClass('hover-bound'),
      $msg = $hover.siblings('.dupe-hammer-message');

      $hover.hover(
      function()
      $hover.showInfoMessage('',
      messageElement: $msg.clone().show(),
      transient: false,
      position: my: 'bottom left', at: 'top center', offsetTop: -7 ,
      dismissable: false,
      relativeToBody: true
      );
      ,
      function()
      StackExchange.helpers.removeMessages();

      );
      );
      );
      Nov 16 '18 at 14:55


      This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Pass a RANGE header with the range of bytes per the documentation Google Drive API - Partial Downloads






          share|improve this answer





























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            Pass a RANGE header with the range of bytes per the documentation Google Drive API - Partial Downloads






            share|improve this answer



























              0














              Pass a RANGE header with the range of bytes per the documentation Google Drive API - Partial Downloads






              share|improve this answer

























                0












                0








                0







                Pass a RANGE header with the range of bytes per the documentation Google Drive API - Partial Downloads






                share|improve this answer













                Pass a RANGE header with the range of bytes per the documentation Google Drive API - Partial Downloads







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 15 '18 at 21:25









                Jason ArmstrongJason Armstrong

                682313




                682313















                    這個網誌中的熱門文章

                    How to read a connectionString WITH PROVIDER in .NET Core?

                    Node.js Script on GitHub Pages or Amazon S3

                    Museum of Modern and Contemporary Art of Trento and Rovereto