Ignoring file not found exceptions

This commit is contained in:
Ziver Koc 2014-08-08 12:52:55 +02:00
parent 5068ee37e3
commit 891051df3c

View file

@ -7,6 +7,7 @@ import com.ericsson.uecontrol.gui.util.Configurator.Configurable;
import org.apache.log4j.Logger;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
@ -88,18 +89,20 @@ public class UeBehaviourSurfing extends UeBehaviour {
StringBuilder content = new StringBuilder();
while ((read = in.read(data)) != -1) {
if(stopExecution())
if (stopExecution())
return;
totalRead += read;
super.setProgress((float) totalRead / estimatedDataLength);
super.setHandledIncomingData(read);
if(cont.parsable)
if (cont.parsable)
content.append(new String(data, 0, read));
if(content.length() > MAX_BUFFER_SIZE)
if (content.length() > MAX_BUFFER_SIZE)
break;
}
if(cont.parsable)
if (cont.parsable)
getAdditionalContent(cont.url, content.toString(), urlList);
}catch(FileNotFoundException fnf){
log.warn("Unable to download: "+urlList.get(i).url);
}catch(IOException e){
log.warn(null, e);
if(retException == null) retException = e;