aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/http/www/Utils.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2015-11-06 14:33:27 +0300
committerGravatar Vitaly Takmazov2015-11-06 14:33:27 +0300
commitc6e5f4092997365a36b2acd8d2c445714e36c6a1 (patch)
treea0e3e2db7857604c1df3f41092fc73bf975cf5ea /src/main/java/com/juick/http/www/Utils.java
parentcd5d2934288b03c7af6da2480f4b392498e77724 (diff)
try https downloads
Diffstat (limited to 'src/main/java/com/juick/http/www/Utils.java')
-rw-r--r--src/main/java/com/juick/http/www/Utils.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/juick/http/www/Utils.java b/src/main/java/com/juick/http/www/Utils.java
index afaf131e..e6fcad72 100644
--- a/src/main/java/com/juick/http/www/Utils.java
+++ b/src/main/java/com/juick/http/www/Utils.java
@@ -193,14 +193,14 @@ public class Utils {
}
}
- public static String downloadImage(String url) throws Exception {
+ public static String downloadImage(URL url) throws Exception {
String attachmentFName = null;
Exception ex = null;
InputStream is = null;
FileOutputStream fos = null;
try {
- URLConnection urlConn = new URL(url).openConnection();
+ URLConnection urlConn = url.openConnection();
is = urlConn.getInputStream();
String mime = urlConn.getContentType();