code: private ResponseType getResponseType(int code) throws IOException {
          try {
              return ResponseType.values()[code];
          } catch (Exception e) {
              throw new IOException("Unrecognized response code: " + code);
          }
      }
docs: Returns the response type from the status value.
  
  @param code The response code.
  @return The response type.