final URLConnection connection = uri.openConnection();\r
contentLength = connection.getContentLength();\r
final InputStream in = connection.getInputStream();\r
+ if (in == null) {\r
+ throw new IOException("Unable to open InputStream from source: " + source);\r
+ }\r
final FileOutputStream out = new FileOutputStream(destTmpFile); \r
int bytesRead = copyStream(in, out, R.string.downloading);\r
\r