[ http://issues.apache.org/jira/browse/HTTPCLIENT-610?page=all ]
Ortwin Glück updated HTTPCLIENT-610:
------------------------------------
Attachment: patch-take2.txt
True. What about the initial size of the ByteArrayOutputStream? By default it's
32 bytes. This means lots of copying and object allocations when the content is
large. I guess this makes the method unsuitable for high-performance /
low-footprint applications. But those applications are better off using
getResponseBodyAsStream() anyway. It's just a convenience method after all.
> HttpMethodBase.getResponseBodyAsString(long limit)
> --------------------------------------------------
>
> Key: HTTPCLIENT-610
> URL: http://issues.apache.org/jira/browse/HTTPCLIENT-610
> Project: HttpComponents HttpClient
> Issue Type: Wish
> Affects Versions: 3.1 Alpha 1
> Reporter: Stepan Koltsov
> Assigned To: Ortwin Glück
> Priority: Trivial
> Attachments: patch-take2.txt
>
>
> Currently HttpMethodBase.getResponseBodyAsString() prints warning in log, and
> suggests using getResponseStream(). However getResponseBodyAsString() is
> extremely useful (as it is easy to use). So my wish is to have method
> getResponseBodyAsString(long limit)
> that should throw HttpException if response size exceeds specified limit.
> Same things with getResponseBody(long limit) .
> Original methods should be deprecated because of danger, explained in javadoc.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]