mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 03:32:16 -05:00
Remove unused Utility.readInputStream
Consider IOUtils.toString instead.
This commit is contained in:
parent
451ffc97c4
commit
4c5f2e59a0
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user