- Timestamp:
- 2005-02-18T12:31:54+13:00 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/GathererApplet.java
r9092 r9095 42 42 import org.greenstone.gatherer.gui.GUIManager; 43 43 import org.greenstone.gatherer.util.Utility; 44 import org.greenstone.gatherer.shell.GShell; 44 45 45 46 … … 208 209 209 210 210 static public void download_url_zip(String col_name, String dir )211 static public void download_url_zip(String col_name, String dir, GShell source) 211 212 { 212 213 try { … … 247 248 int len; 248 249 249 while ((len = dl_dbis.read(buf)) >= 0 ) {250 while ((len = dl_dbis.read(buf)) >= 0 && !source.hasSignalledStop()) { 250 251 zip_bfos.write(buf,0,len); 251 252 } … … 261 262 262 263 263 static public void upload_url_zip(String col_name, String dir )264 static public void upload_url_zip(String col_name, String dir, GShell source) 264 265 { 265 266 final String lineEnd = "\r\n"; … … 320 321 // read file and write it into form... 321 322 int bytesRead = fileInputStream.read(buffer, 0, bufferSize); 322 323 323 324 while (bytesRead > 0) { 325 // Check to see if action has been cancelled. 326 if (source != null && source.hasSignalledStop()) { 327 break; 328 } 324 329 dos.write(buffer, 0, bufferSize); 325 330 bytesAvailable = fileInputStream.available();
Note:
See TracChangeset
for help on using the changeset viewer.