code: public BigDecimal getPrice(boolean refresh) throws IOException {
          if(refresh) {
              FxQuotesRequest request = new FxQuotesRequest(this.symbol);
              this.price = request.getSingleResult().getPrice();
          }
          return price;
      }
docs: Returns the requested FX rate.
  This method will return 0 in the following situations:
  <ul>
  <li> the data hasn't been loaded yet
  in a previous request and refresh is set to false.
  <li> refresh is true and the data cannot be retrieved from Yahoo Finance
  for whatever reason (symbol not recognized, no network connection, ...)
  </ul>
  
  @param refresh   indicates whether the data should be requested again to Yahoo Finance
  @return          the requested FX rate
  @throws java.io.IOException when there's a connection problem