I am writing a REST client for CouchDB in Java. The following code should be quite standard:
this.httpCnt.connect(); Map respon
See this question:
"The HttpURLConnection.getErrorStream method will return an InputStream which can be used to retrieve data from error conditions (such as a 404), according to the javadocs."