@@ -0,0 +1,1754 @@
+package com.example.profbola.bakingtime.utils;%0A%0Aimport org.json.JSONArray;%0Aimport org.json.JSONException;%0A%0Aimport java.io.BufferedInputStream;%0Aimport java.io.BufferedReader;%0Aimport java.io.IOException;%0Aimport java.io.InputStream;%0Aimport java.io.InputStreamReader;%0Aimport java.net.MalformedURLException;%0Aimport java.net.URL;%0A%0Aimport javax.net.ssl.HttpsURLConnection;%0A%0A/**%0A * Created by prof.BOLA on 6/29/2017.%0A */%0A%0Apublic class RecipeNetworkUtil %7B%0A%0A    public static final String API_URL = %22https://go.udacity.com/android-baking-app-json%22;%0A%0A    private static URL makeApiUrlFromSring() %7B%0A        URL url = null;%0A        try %7B%0A            url = new URL(API_URL);%0A        %7D catch (MalformedURLException e) %7B%0A            e.printStackTrace();%0A        %7D%0A%0A        return url;%0A    %7D%0A%0A    public static JSONArray getRecipeFromApi() %7B%0A        JSONArray recipes = null;%0A        HttpsURLConnection connection = null;%0A        try %7B%0A            connection = (HttpsURLConnection) makeApiUrlFromSring().openConnection();%0A            InputStream stream = new BufferedInputStream(connection.getInputStream());%0A            BufferedReader reader = new BufferedReader(new InputStreamReader(stream));%0A%0A            StringBuilder builder = new StringBuilder();%0A            String results;%0A%0A            while ((results = reader.readLine()) != null) %7B%0A                builder.append(results);%0A            %7D%0A%0A            recipes = new JSONArray(String.valueOf(builder));%0A            connection.disconnect();%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D catch (JSONException e) %7B%0A            e.printStackTrace();%0A        %7D finally %7B%0A            assert connection != null;%0A            connection.disconnect();%0A        %7D%0A        return recipes;%0A    %7D%0A%7D

Add RecipeNetworkUtil