You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by og...@apache.org on 2007/05/18 14:56:56 UTC
svn commit: r539441 - in /jakarta/commons/proper/httpclient/trunk:
release_notes.txt src/java/org/apache/commons/httpclient/HttpMethodBase.java
Author: oglueck
Date: Fri May 18 05:56:55 2007
New Revision: 539441
URL: http://svn.apache.org/viewvc?view=rev&rev=539441
Log:
Improved API Doc regarding response buffering.
PR: HTTPCLIENT-651
Contributed by: Ortwin Glück
Modified:
jakarta/commons/proper/httpclient/trunk/release_notes.txt
jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
Modified: jakarta/commons/proper/httpclient/trunk/release_notes.txt
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/release_notes.txt?view=diff&rev=539441&r1=539440&r2=539441
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/release_notes.txt (original)
+++ jakarta/commons/proper/httpclient/trunk/release_notes.txt Fri May 18 05:56:55 2007
@@ -1,5 +1,8 @@
Changes since 3.1 RC 1
+* [HTTPCLIENT-651] - Improved API Doc regarding response buffering.
+ Contributed by Ortwin Glück <oglueck at apache.org>
+
* [HTTPCLIENT-645] - Cookie#compare() changed to do a simple case-sensitive string comparison
when comparing path attributes instead of using a static instance of RuleBasedCollator
Contributed by Oleg Kalnichevski <olegk at apache.org>
Modified: jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java?view=diff&rev=539441&r1=539440&r2=539441
==============================================================================
--- jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java (original)
+++ jakarta/commons/proper/httpclient/trunk/src/java/org/apache/commons/httpclient/HttpMethodBase.java Fri May 18 05:56:55 2007
@@ -655,7 +655,9 @@
/**
* Returns the response body of the HTTP method, if any, as an array of bytes.
- * If response body is not available or cannot be read, returns <tt>null</tt>
+ * If response body is not available or cannot be read, returns <tt>null</tt>.
+ * Buffers the response and this method can be called several times yielding
+ * the same result each time.
*
* Note: This will cause the entire response body to be buffered in memory. A
* malicious server may easily exhaust all the VM memory. It is strongly
@@ -698,7 +700,9 @@
/**
* Returns the response body of the HTTP method, if any, as an array of bytes.
- * If response body is not available or cannot be read, returns <tt>null</tt>
+ * If response body is not available or cannot be read, returns <tt>null</tt>.
+ * Buffers the response and this method can be called several times yielding
+ * the same result each time.
*
* Note: This will cause the entire response body to be buffered in memory. This method is
* safe if the content length of the response is unknown, because the amount of memory used
@@ -755,7 +759,9 @@
/**
* Returns the response body of the HTTP method, if any, as an {@link InputStream}.
- * If response body is not available, returns <tt>null</tt>
+ * If response body is not available, returns <tt>null</tt>. If the response has been
+ * buffered this method returns a new stream object on every call. If the response
+ * has not been buffered the returned stream can only be read once.
*
* @return The response body or <code>null</code>.
*
@@ -778,7 +784,8 @@
* Returns the response body of the HTTP method, if any, as a {@link String}.
* If response body is not available or cannot be read, returns <tt>null</tt>
* The string conversion on the data is done using the character encoding specified
- * in <tt>Content-Type</tt> header.
+ * in <tt>Content-Type</tt> header. Buffers the response and this method can be
+ * called several times yielding the same result each time.
*
* Note: This will cause the entire response body to be buffered in memory. A
* malicious server may easily exhaust all the VM memory. It is strongly
@@ -806,7 +813,8 @@
* Returns the response body of the HTTP method, if any, as a {@link String}.
* If response body is not available or cannot be read, returns <tt>null</tt>
* The string conversion on the data is done using the character encoding specified
- * in <tt>Content-Type</tt> header.<p>
+ * in <tt>Content-Type</tt> header. Buffers the response and this method can be
+ * called several times yielding the same result each time.</p>
*
* Note: This will cause the entire response body to be buffered in memory. This method is
* safe if the content length of the response is unknown, because the amount of memory used
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org