aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2013-01-13 11:30:07 +0100
committerSamuel Tardieu <sam@rfc1149.net>2013-01-13 11:30:07 +0100
commit7bdfba7a8ddad0151a8883800f2906f9f922b04a (patch)
treecfd35b41a162bad20c6bc30c96ef5822a89601af
parent4eac6e33882ebd8e6383f99a00f6911c90b1e5b0 (diff)
downloadcgeo-7bdfba7a8ddad0151a8883800f2906f9f922b04a.zip
cgeo-7bdfba7a8ddad0151a8883800f2906f9f922b04a.tar.gz
cgeo-7bdfba7a8ddad0151a8883800f2906f9f922b04a.tar.bz2
Add javadoc to BaseUtils#getResponseData
-rw-r--r--main/src/cgeo/geocaching/network/Network.java16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/network/Network.java b/main/src/cgeo/geocaching/network/Network.java
index 6ab7704..7058bfc 100644
--- a/main/src/cgeo/geocaching/network/Network.java
+++ b/main/src/cgeo/geocaching/network/Network.java
@@ -408,10 +408,26 @@ public abstract class Network {
}
}
+ /**
+ * Get the body of a HTTP response.
+ *
+ * {@link BaseUtils#replaceWhitespace(String)} will be called on the result
+ *
+ * @param response a HTTP response, which can be null
+ * @return the body if the response comes from a successful HTTP request, <code>null</code> otherwise
+ */
public static String getResponseData(final HttpResponse response) {
return Network.getResponseData(response, true);
}
+ /**
+ * Get the body of a HTTP response.
+ *
+ * @param response a HTTP response, which can be null
+ * @param replaceWhitespace <code>true</code> if {@link BaseUtils#replaceWhitespace(String)}
+ * should be called on the body
+ * @return the body if the response comes from a successful HTTP request, <code>null</code> otherwise
+ */
public static String getResponseData(final HttpResponse response, boolean replaceWhitespace) {
if (!isSuccess(response)) {
return null;