| 9 |
|
import java.net.URLConnection; |
| 10 |
|
import java.util.HashSet; |
| 11 |
|
|
| 12 |
+ |
import net.oni2.ProxySettings; |
| 13 |
+ |
|
| 14 |
|
/** |
| 15 |
|
* @author Christian Illy |
| 16 |
|
*/ |
| 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) { |
| 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 |