code: private static boolean finishLastResponse(final HttpConnection conn) {
          InputStream lastResponse = conn.getLastResponseInputStream();
          if(lastResponse != null) {
              conn.setLastResponseInputStream(null);
              try {
                  lastResponse.close();
                  return true;
              } catch (IOException ioe) {
                  // force reconnect.
                  return false;
              }
          } else {
              return false;
          }
      }
docs: Since the same connection is about to be reused, make sure the
  previous request was completely processed, and if not
  consume it now.
  @param conn The connection
  @return true, if the connection is reusable