ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/java/HTTPFileDownloader/src/net/oni2/httpfiledownloader/FileDownloader.java
(Generate patch)

Comparing java/HTTPFileDownloader/src/net/oni2/httpfiledownloader/FileDownloader.java (file contents):
Revision 786 by alloc, Wed Apr 3 23:46:31 2013 UTC vs.
Revision 852 by alloc, Fri May 3 12:25:21 2013 UTC

# Line 9 | Line 9 | import java.net.URL;
9   import java.net.URLConnection;
10   import java.util.HashSet;
11  
12 + import net.oni2.ProxySettings;
13 +
14   /**
15   * @author Christian Illy
16   */
# Line 146 | Line 148 | public class FileDownloader implements R
148                  String strLastModified = null;
149                  String strEtag = null;
150                  RandomAccessFile outFile = null;
151 +
152                  try {
153                          outFile = new RandomAccessFile(target, "rw");
154                  } catch (FileNotFoundException e1) {
# Line 173 | Line 176 | public class FileDownloader implements R
176                                          case RUNNING:
177                                                  BufferedInputStream input = null;
178                                                  try {
179 <                                                        URLConnection connection = url.openConnection();
180 <                                                        connection.setRequestProperty("Cache-Control", "no-cache");
179 >                                                        URLConnection connection = url
180 >                                                                        .openConnection(ProxySettings.getInstance()
181 >                                                                                        .getProxy());
182 >                                                        connection.setRequestProperty("Cache-Control",
183 >                                                                        "no-cache");
184                                                          if (downloaded == 0) {
185                                                                  connection.connect();
186                                                                  strLastModified = connection

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)