diff options
author | Björn Hagemeister | 2014-11-12 16:14:16 +0100 |
---|---|---|
committer | Björn Hagemeister | 2014-11-12 16:14:16 +0100 |
commit | f9414e539ed6d16dedfa6e7f55206f4d6aed6246 (patch) | |
tree | d19cfab55dc86339ba8b9ab0d5b909ad390b180a /src/main/java/org/openslx/taskmanager/tasks/DownloadText.java | |
parent | bwlehrpool user was renamed (diff) | |
download | tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.tar.gz tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.tar.xz tmlite-bwlp-f9414e539ed6d16dedfa6e7f55206f4d6aed6246.zip |
Added class ProxyHandler for for configuring proxy settings system wide once before starting downloading.
Diffstat (limited to 'src/main/java/org/openslx/taskmanager/tasks/DownloadText.java')
-rw-r--r-- | src/main/java/org/openslx/taskmanager/tasks/DownloadText.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/org/openslx/taskmanager/tasks/DownloadText.java b/src/main/java/org/openslx/taskmanager/tasks/DownloadText.java index 11b30cf..76881d0 100644 --- a/src/main/java/org/openslx/taskmanager/tasks/DownloadText.java +++ b/src/main/java/org/openslx/taskmanager/tasks/DownloadText.java @@ -6,6 +6,7 @@ import java.net.URL; import java.net.URLConnection; import java.nio.charset.StandardCharsets; +import org.openslx.satserver.util.ProxyHandler; import org.openslx.satserver.util.Util; import org.openslx.taskmanager.api.AbstractTask; @@ -37,6 +38,9 @@ public class DownloadText extends AbstractTask { URLConnection connection = null; BufferedInputStream in = null; + + // Before open connection, handle proxy settings. + ProxyHandler.configProxy(); try { connection = new URL( this.url ).openConnection(); in = new BufferedInputStream( connection.getInputStream() ); |