code: public boolean status(int responseCode) {
  		if (urlConnection instanceof HttpURLConnection) {
  			HttpURLConnection http = (HttpURLConnection) urlConnection;
  			try {
  				return http.getResponseCode() == responseCode;
  			} catch (IOException e) {
  				e.printStackTrace();
  				return false;
  			}
  		} else
  			return false;
  	}
docs: Check if the URLConnection has returned the specified responseCode
  
  @param responseCode
  @return