We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 417439a commit 66fd667Copy full SHA for 66fd667
src/main/java/com/qiniu/http/Response.java
@@ -8,6 +8,7 @@
8
import okhttp3.MediaType;
9
10
import java.io.IOException;
11
+import java.io.InputStream;
12
import java.util.Locale;
13
14
/**
@@ -198,6 +199,13 @@ public String bodyString() throws QiniuException {
198
199
return StringUtils.utf8String(body());
200
}
201
202
+ public synchronized InputStream bodyStream() throws QiniuException {
203
+ if (this.response == null) {
204
+ return null;
205
+ }
206
+ return this.response.body().byteStream();
207
208
+
209
public String contentType() {
210
return ctype(response);
211
0 commit comments