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 2e3ea67 commit 6b63346Copy full SHA for 6b63346
src/main/java/com/ning/http/util/AsyncHttpProviderUtils.java
@@ -182,11 +182,7 @@ public final static String getAuthority(URI uri) {
182
}
183
184
public final static String contentToString(Collection<HttpResponseBodyPart> bodyParts, String charset) throws UnsupportedEncodingException {
185
- StringBuilder b = new StringBuilder();
186
- for (HttpResponseBodyPart bp : bodyParts) {
187
- b.append(new String(bp.getBodyPartBytes(), charset));
188
- }
189
- return b.toString();
+ return new String(contentToByte(bodyParts), charset);
190
191
192
public final static byte[] contentToByte(Collection<HttpResponseBodyPart> bodyParts) throws UnsupportedEncodingException {
0 commit comments