Revision 38600 branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/utils/Download.java
Download.java | ||
---|---|---|
106 | 106 |
} |
107 | 107 |
|
108 | 108 |
URLConnection connection = downloadURL.openConnection(); |
109 |
connection.setConnectTimeout(30000); |
|
110 |
connection.setReadTimeout(20000); |
|
111 |
|
|
109 | 112 |
String fileName = getFileName(connection); |
110 | 113 |
|
111 | 114 |
if (LOG.isDebugEnabled()) { |
... | ... | |
124 | 127 |
fileNameSuffix = fileName.substring(dotPosition); |
125 | 128 |
} |
126 | 129 |
|
127 |
BufferedInputStream bis = new BufferedInputStream(downloadURL |
|
128 |
.openStream()); |
|
130 |
BufferedInputStream bis = new BufferedInputStream(connection.getInputStream()); |
|
129 | 131 |
|
130 | 132 |
File localFile = File.createTempFile(fileNamePrefix, fileNameSuffix); |
131 | 133 |
|
Also available in: Unified diff