in src/main/java/com/aliyun/tea/TeaResponse.java [42:60]
public String getResponseBody() {
if (null == body) {
return String.format("{\"message\":\"%s\"}", statusMessage);
}
ByteArrayOutputStream os = new ByteArrayOutputStream();
byte[] buff = new byte[4096];
try {
while (true) {
final int read = body.read(buff);
if (read == -1) {
break;
}
os.write(buff, 0, read);
}
} catch (Exception e) {
throw new TeaException(e.getMessage(), e);
}
return new String(os.toByteArray());
}