diff --git a/gcloud-java-storage/src/main/java/com/google/cloud/storage/spi/DefaultStorageRpc.java b/gcloud-java-storage/src/main/java/com/google/cloud/storage/spi/DefaultStorageRpc.java index 4ef9afc45e4c..1a9589aa40cf 100644 --- a/gcloud-java-storage/src/main/java/com/google/cloud/storage/spi/DefaultStorageRpc.java +++ b/gcloud-java-storage/src/main/java/com/google/cloud/storage/spi/DefaultStorageRpc.java @@ -355,8 +355,7 @@ public byte[] load(StorageObject from, Map options) { .setIfGenerationMatch(IF_GENERATION_MATCH.getLong(options)) .setIfGenerationNotMatch(IF_GENERATION_NOT_MATCH.getLong(options)); ByteArrayOutputStream out = new ByteArrayOutputStream(); - getRequest.getMediaHttpDownloader().setDirectDownloadEnabled(true); - getRequest.executeMediaAndDownloadTo(out); + getRequest.executeMedia().download(out); return out.toByteArray(); } catch (IOException ex) { throw translate(ex);