From 589df22dd4e3105d8d02bd0684f365784904ba49 Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Mon, 21 Mar 2016 18:18:33 -0700 Subject: [PATCH 1/2] Add download streaming support --- client-runtime/build.gradle | 1 + .../src/main/java/com/microsoft/rest/ServiceResponseBuilder.java | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/client-runtime/build.gradle b/client-runtime/build.gradle index 47cbaf08c6397..b1bea55897fb1 100644 --- a/client-runtime/build.gradle +++ b/client-runtime/build.gradle @@ -32,6 +32,7 @@ dependencies { compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.1' compile 'org.apache.commons:commons-lang3:3.4' + compile 'commons-io:commons-io:2.4' testCompile 'junit:junit:4.12' testCompile 'junit:junit-dep:4.11' deployerJars "org.apache.maven.wagon:wagon-ftp:2.10" diff --git a/client-runtime/src/main/java/com/microsoft/rest/ServiceResponseBuilder.java b/client-runtime/src/main/java/com/microsoft/rest/ServiceResponseBuilder.java index 2915ae5e44b8d..e94a166cd1765 100644 --- a/client-runtime/src/main/java/com/microsoft/rest/ServiceResponseBuilder.java +++ b/client-runtime/src/main/java/com/microsoft/rest/ServiceResponseBuilder.java @@ -272,7 +272,6 @@ protected Object buildBody(int statusCode, ResponseBody responseBody) throws IOE // Return raw response if InputStream is the target type else if (type == InputStream.class) { InputStream stream = responseBody.byteStream(); - responseBody.close(); return stream; } // Deserialize From a718459696152aa07480469bde117c9c93ef9fdd Mon Sep 17 00:00:00 2001 From: Jianghao Lu Date: Mon, 21 Mar 2016 18:20:26 -0700 Subject: [PATCH 2/2] commons-io was for debugging --- client-runtime/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/client-runtime/build.gradle b/client-runtime/build.gradle index b1bea55897fb1..47cbaf08c6397 100644 --- a/client-runtime/build.gradle +++ b/client-runtime/build.gradle @@ -32,7 +32,6 @@ dependencies { compile 'com.fasterxml.jackson.core:jackson-databind:2.7.1' compile 'com.fasterxml.jackson.datatype:jackson-datatype-joda:2.7.1' compile 'org.apache.commons:commons-lang3:3.4' - compile 'commons-io:commons-io:2.4' testCompile 'junit:junit:4.12' testCompile 'junit:junit-dep:4.11' deployerJars "org.apache.maven.wagon:wagon-ftp:2.10"