aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/core/util
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-09-11 14:28:49 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-09-11 14:28:49 +1000
commit9c1f8b82bfbe52c43002a45db897588721dcbb8d (patch)
treedb542c0fcd02b85b998aeef7572740a7d81cb423 /src/Java/gtPlusPlus/core/util
parent65e7be449116dc3364e9df4d5ec3cba83c5d1884 (diff)
downloadGT5-Unofficial-9c1f8b82bfbe52c43002a45db897588721dcbb8d.tar.gz
GT5-Unofficial-9c1f8b82bfbe52c43002a45db897588721dcbb8d.tar.bz2
GT5-Unofficial-9c1f8b82bfbe52c43002a45db897588721dcbb8d.zip
[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.
Diffstat (limited to 'src/Java/gtPlusPlus/core/util')
-rw-r--r--src/Java/gtPlusPlus/core/util/networking/NetworkUtils.java45
1 files changed, 45 insertions, 0 deletions
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;
+ }
+
+}