public boolean doDownload() throws IOException{
			
		URL fullURL = new URL(srcUrl.toString() + srcFileName);
		
		Logger.log("Start downloading file: " + fullURL.toString());
			
		URLConnection uc = fullURL.openConnection();
		uc.setReadTimeout(0);
		
		String contentType = uc.getContentType();
		int contentLength = uc.getContentLength();
		
		if (!contentType.startsWith("application/pdf") || contentLength == -1) {
			Logger.log("Error: Unsuppoted content type: " + contentType + ", skipping file " + srcFileName);		
			return false;
		}
		
		InputStream raw = uc.getInputStream();
		InputStream in = new BufferedInputStream(raw);
		
		byte[] data = new byte[contentLength];
		int bytesRead = 0;
		int offset = 0;
		
		int count = 0; 
		while (offset < contentLength) {
			bytesRead = in.read(data, offset, data.length - offset);
			if (bytesRead == -1)
				break;
			offset += bytesRead;
			count++;
			if (count % 5000 == 0)
				System.out.print("\n");			
			else if (count % 50 == 0)
				System.out.print(".");

		}
				
		if (count>=50){
			System.out.print("\n");
		}
		
		in.close();

		if (offset != contentLength) {
			throw new IOException("Only read " + offset + " bytes; Expected " + contentLength + " bytes");
		}

		FileOutputStream out = null;
		try {
			out = new FileOutputStream(targetPath + targetFileName);
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
			return false;
		}
		
		out.write(data);
		out.flush();
		out.close();
		
		Logger.log("Finished downloading file: " + fullURL.toString());
		
		return true;
	}