From 4c5f2e59a014af8503a55d968d9b381f7ec44ccd Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Wed, 19 Oct 2011 23:08:31 -0700 Subject: [PATCH] Remove unused Utility.readInputStream Consider IOUtils.toString instead. --- src/com/fsck/k9/helper/Utility.java | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/com/fsck/k9/helper/Utility.java b/src/com/fsck/k9/helper/Utility.java index 832df84db..d462dd4cf 100644 --- a/src/com/fsck/k9/helper/Utility.java +++ b/src/com/fsck/k9/helper/Utility.java @@ -12,9 +12,6 @@ import com.fsck.k9.mail.filter.Base64; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; import java.io.UnsupportedEncodingException; import java.util.Date; import java.util.regex.Matcher; @@ -36,17 +33,6 @@ public class Utility { private static final Pattern TAG_PATTERN = Pattern.compile("\\[[-_a-z0-9]+\\] ", Pattern.CASE_INSENSITIVE); - public static String readInputStream(InputStream in, String encoding) throws IOException { - InputStreamReader reader = new InputStreamReader(in, encoding); - StringBuilder sb = new StringBuilder(); - int count; - char[] buf = new char[512]; - while ((count = reader.read(buf)) != -1) { - sb.append(buf, 0, count); - } - return sb.toString(); - } - public static boolean arrayContains(Object[] a, Object o) { for (Object element : a) { if (element.equals(o)) {