From f94ac10a9bda91022e362fa8301cd33bb1f7fd64 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 27 Jul 2017 11:37:17 +0200 Subject: [PATCH] HttpUtils: Remove now-unused method. --- .../galaxyzoo/app/provider/HttpUtils.java | 48 +------------------ 1 file changed, 1 insertion(+), 47 deletions(-) diff --git a/app/src/main/java/com/murrayc/galaxyzoo/app/provider/HttpUtils.java b/app/src/main/java/com/murrayc/galaxyzoo/app/provider/HttpUtils.java index cc2f2946..d87d5497 100644 --- a/app/src/main/java/com/murrayc/galaxyzoo/app/provider/HttpUtils.java +++ b/app/src/main/java/com/murrayc/galaxyzoo/app/provider/HttpUtils.java @@ -220,53 +220,7 @@ private static long getUriLastModified(final String strUrl) { con.disconnect(); //Otherwise StrictMode says (with an exception) that we leak. return result; } - */ - - - /** - * - * @param context - * @param data - * @param cacheFileContentUri A Content URI for a cache file. - * @throws IOException - */ - private static void parseGetFileResponseContent(final Context context, final byte[] data, final String cacheFileContentUri) throws IOException { - //Write the content to the file: - ParcelFileDescriptor pfd = null; - FileOutputStream fout = null; - try { - //Use this instead when using the commented icon-downloading code in IconsCache: - //fout = new FileOutputStream(cacheFileContentUri); - //fout.write(data); - - //FileOutputStream doesn't seem to understand content provider URIs: - pfd = context.getContentResolver(). - openFileDescriptor(Uri.parse(cacheFileContentUri), "w"); - if (pfd == null) { - Log.error("parseGetFileResponseContent(): pfd is null."); - } else { - - fout = new FileOutputStream(pfd.getFileDescriptor()); - fout.write(data); - } - } finally { - if (fout != null) { - try { - fout.close(); - } catch (final IOException e) { - Log.error("parseGetFileResponseContent(): Exception while closing fout", e); - } - } - - if (pfd != null) { - try { - pfd.close(); - } catch (final IOException e) { - Log.error("parseGetFileResponseContent(): Exception while closing pfd", e); - } - } - } - } + * /** *