From 9c1f8b82bfbe52c43002a45db897588721dcbb8d Mon Sep 17 00:00:00 2001 From: Draknyte1 Date: Sun, 11 Sep 2016 14:28:49 +1000 Subject: [1.4.6.5.2-release] + Added the Multitank, 3x3x20, at biggest, minimum 3x3x4 (Height wise) $ Fixed TF stuff loading when it shouldn't, again. --- .../core/util/networking/NetworkUtils.java | 45 ++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java (limited to 'src/Java/gtPlusPlus/core/util') diff --git a/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java new file mode 100644 index 0000000000..9e7e033bed --- /dev/null +++ b/src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java @@ -0,0 +1,45 @@ +package gtPlusPlus.core.util.networking; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; + +public class NetworkUtils { + + public static String getContentFromURL(String args) { + + URL url; + + try { + // get URL content + url = new URL(args); + URLConnection conn = url.openConnection(); + + // open the stream and put it into BufferedReader + BufferedReader br = new BufferedReader( + new InputStreamReader(conn.getInputStream())); + + String inputLine; + String tempLine = null; + + + + + while ((inputLine = br.readLine()) != null) { + tempLine = inputLine; + } + + br.close(); + return tempLine; + } catch (MalformedURLException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + return null; + } + +} -- cgit