Skip to content

Commit

Permalink
3929: Changed to Guava ByteStreams.copy() that has a bit better perfo…
Browse files Browse the repository at this point in the history
…rmance (#1239)
  • Loading branch information
andrey-qlogic authored Feb 5, 2019
1 parent b8c6ea7 commit e41f69b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import com.google.api.client.http.HttpRequestInitializer;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.util.IOUtils;
import com.google.api.client.util.Preconditions;
import com.google.common.io.ByteStreams;
import java.io.IOException;
import java.io.OutputStream;

Expand Down Expand Up @@ -243,7 +243,7 @@ private HttpResponse executeCurrentRequest(long currentRequestLastBytePos, Gener
// execute the request and copy into the output stream
HttpResponse response = request.execute();
try {
IOUtils.copy(response.getContent(), outputStream);
ByteStreams.copy(response.getContent(), outputStream);
} finally {
response.disconnect();
}
Expand Down

0 comments on commit e41f69b

Please sign in to comment.