Skip to content

Commit

Permalink
Manually change byte[] to File
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Mar 21, 2016
1 parent 5e04616 commit 6ac47d9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion client-runtime/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ checkstyle {
dependencies {
compile 'com.google.guava:guava:18.0'
compile 'com.squareup.retrofit2:retrofit:2.0.0-beta4'
compile 'com.squareup.okhttp3:okhttp:3.1.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okio:okio:1.7.0-SNAPSHOT'
compile 'com.squareup.okhttp3:logging-interceptor:3.1.1'
compile 'com.squareup.okhttp3:okhttp-urlconnection:3.1.1'
compile 'com.squareup.retrofit2:converter-jackson:2.0.0-beta4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,9 @@ protected Object buildBody(int statusCode, ResponseBody responseBody) throws IOE
}
// Return raw response if InputStream is the target type
else if (type == InputStream.class) {
return responseBody.byteStream();
InputStream stream = responseBody.byteStream();
responseBody.close();
return stream;
}
// Deserialize
else {
Expand Down

0 comments on commit 6ac47d9

Please sign in to comment.