Index: /trunk/src/org/openstreetmap/josm/tools/HttpClient.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 9176)
+++ /trunk/src/org/openstreetmap/josm/tools/HttpClient.java	(revision 9177)
@@ -26,4 +26,5 @@
 /**
  * Provides a uniform access for a HTTP/HTTPS server. This class should be used in favour of {@link HttpURLConnection}.
+ * @since 9168
  */
 public final class HttpClient {
@@ -46,4 +47,9 @@
     }
 
+    /**
+     * Opens the HTTP connection.
+     * @return HTTP response
+     * @throws IOException if any I/O error occurs
+     */
     public Response connect() throws IOException {
         final HttpURLConnection connection = (HttpURLConnection) url.openConnection();
@@ -146,4 +152,11 @@
         }
 
+        /**
+         * Sets whether {@link #getContent()} should uncompress the input stream according to {@code Content-Disposition}
+         * HTTP header.
+         * @param uncompressAccordingToContentDisposition whether the input stream should be uncompressed according to
+         * {@code Content-Disposition}
+         * @return {@code this}
+         */
         public Response uncompressAccordingToContentDisposition(boolean uncompressAccordingToContentDisposition) {
             this.uncompressAccordingToContentDisposition = uncompressAccordingToContentDisposition;
@@ -152,4 +165,6 @@
 
         /**
+         * Returns the URL.
+         * @return the URL
          * @see HttpURLConnection#getURL()
          */
@@ -159,4 +174,6 @@
 
         /**
+         * Returns the request method.
+         * @return the HTTP request method
          * @see HttpURLConnection#getRequestMethod()
          */
@@ -168,7 +185,9 @@
          * Returns an input stream that reads from this HTTP connection, or,
          * error stream if the connection failed but the server sent useful data.
-         *
+         * <p>
          * Note: the return value can be null, if both the input and the error stream are null.
          * Seems to be the case if the OSM server replies a 401 Unauthorized, see #3887
+         * @return input or error stream
+         * @throws IOException if any I/O error occurs
          *
          * @see HttpURLConnection#getInputStream()
@@ -205,4 +224,6 @@
          *
          * Detects Unicode charset in use utilizing {@link UTFInputStreamReader}.
+         * @return buffered reader
+         * @throws IOException if any I/O error occurs
          */
         public BufferedReader getContentReader() throws IOException {
@@ -215,5 +236,7 @@
          * Fetches the HTTP response as String.
          * @return the response
-         */
+         * @throws IOException if any I/O error occurs
+         */
+        @SuppressWarnings("resource")
         public String fetchContent() throws IOException {
             try (Scanner scanner = new Scanner(getContentReader()).useDelimiter("\\A")) {
@@ -224,4 +247,5 @@
         /**
          * Gets the response code from this HTTP connection.
+         * @return HTTP response code
          *
          * @see HttpURLConnection#getResponseCode()
@@ -233,4 +257,5 @@
         /**
          * Gets the response message from this HTTP connection.
+         * @return HTTP response message
          *
          * @see HttpURLConnection#getResponseMessage()
@@ -242,4 +267,5 @@
         /**
          * Returns the {@code Content-Encoding} header.
+         * @return {@code Content-Encoding} HTTP header
          */
         public String getContentEncoding() {
@@ -249,4 +275,5 @@
         /**
          * Returns the {@code Content-Type} header.
+         * @return {@code Content-Type} HTTP header
          */
         public String getContentType() {
@@ -256,4 +283,5 @@
         /**
          * Returns the {@code Content-Length} header.
+         * @return {@code Content-Length} HTTP header
          */
         public long getContentLength() {
@@ -262,4 +290,7 @@
 
         /**
+         * Returns the value of the named header field.
+         * @param name the name of a header field
+         * @return the value of the named header field, or {@code null} if there is no such field in the header
          * @see HttpURLConnection#getHeaderField(String)
          */
@@ -269,4 +300,7 @@
 
         /**
+         * Returns the list of Strings that represents the named header field values.
+         * @param name the name of a header field
+         * @return unmodifiable List of Strings that represents the corresponding field values
          * @see HttpURLConnection#getHeaderFields()
          */
@@ -316,4 +350,5 @@
     /**
      * Returns the URL set for this connection.
+     * @return the URL
      * @see #create(URL)
      * @see #create(URL, String)
@@ -325,4 +360,5 @@
     /**
      * Returns the request method set for this connection.
+     * @return the HTTP request method
      * @see #create(URL, String)
      */
@@ -333,4 +369,6 @@
     /**
      * Returns the set value for the given {@code header}.
+     * @param header HTTP header name
+     * @return HTTP header value
      */
     public String getRequestHeader(String header) {
@@ -364,4 +402,8 @@
 
     /**
+     * Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced
+     * by this URLConnection. If the timeout expires before the connection can be established, a
+     * {@link java.net.SocketTimeoutException} is raised. A timeout of zero is interpreted as an infinite timeout.
+     * @param connectTimeout an {@code int} that specifies the connect timeout value in milliseconds
      * @return {@code this}
      * @see HttpURLConnection#setConnectTimeout(int)
@@ -373,8 +415,11 @@
 
     /**
+     * Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from
+     * input stream when a connection is established to a resource. If the timeout expires before there is data available for
+     * read, a {@link java.net.SocketTimeoutException} is raised. A timeout of zero is interpreted as an infinite timeout.
+     * @param readTimeout an {@code int} that specifies the read timeout value in milliseconds
      * @return {@code this}
      * @see HttpURLConnection#setReadTimeout(int) (int)
      */
-
     public HttpClient setReadTimeout(int readTimeout) {
         this.readTimeout = readTimeout;
@@ -384,4 +429,5 @@
     /**
      * Sets the {@code Accept} header.
+     * @param accept header value
      *
      * @return {@code this}
@@ -393,4 +439,5 @@
     /**
      * Sets the request body for {@code PUT}/{@code POST} requests.
+     * @param requestBody request body
      *
      * @return {@code this}
@@ -403,4 +450,5 @@
     /**
      * Sets the {@code If-Modified-Since} header.
+     * @param ifModifiedSince header value
      *
      * @return {@code this}
@@ -416,4 +464,5 @@
      * Set {@code maxRedirects} to {@code -1} in order to ignore redirects, i.e.,
      * to not throw an {@link IOException} in {@link #connect()}.
+     * @param maxRedirects header value
      *
      * @return {@code this}
@@ -426,4 +475,6 @@
     /**
      * Sets an arbitrary HTTP header.
+     * @param key header name
+     * @param value header value
      *
      * @return {@code this}
@@ -436,4 +487,5 @@
     /**
      * Sets arbitrary HTTP headers.
+     * @param headers HTTP headers
      *
      * @return {@code this}
@@ -446,4 +498,6 @@
     /**
      * Sets a reason to show on console. Can be {@code null} if no reason is given.
+     * @param reasonForRequest Reason to show
+     * @return {@code this}
      */
     public HttpClient setReasonForRequest(String reasonForRequest) {
@@ -464,4 +518,3 @@
         }
     }
-
 }
