class EthGasStationInfoDao {

    public EthGasInfo getEthPriceInfo() throws IOException {
        EthStationGasInfo ethGasInfo = null;
        HttpsURLConnection con = null;
        try {

            URL url = new URL(Constants.ETH_STATION_GAS_INFO_URL);
            SSLContext sc = null;
            try {
                sc = SSLContext.getInstance("TLSv1.2");
                sc.init(null, null, new java.security.SecureRandom());
            } catch (NoSuchAlgorithmException ex) {
                Logger.getLogger(EthGasStationInfoDao.class.getName()).log(Level.SEVERE, null, ex);
            } catch (KeyManagementException ex) {
                Logger.getLogger(EthGasStationInfoDao.class.getName()).log(Level.SEVERE, null, ex);
            }

            con = (HttpsURLConnection) url.openConnection();
            con.setSSLSocketFactory(sc.getSocketFactory());

            con.setRequestMethod("GET");

            if (con.getResponseCode() == HttpURLConnection.HTTP_OK) {
                try (Reader reader = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"))) {
                    ethGasInfo = new ObjectMapper()
                        .readerFor(EthStationGasInfo.class)
                        .readValue(reader);
                }
            }
        } finally {
            con.disconnect();
        }

        if (ethGasInfo.getSafeLowSpeedPrice().equals(0L)) {
            return null;
        }

        return ethGasInfo;
    }

}