List of utility methods to do InputStream Read by Encoding
String | getStreamContent(InputStream is, String encoding) get Stream Content if (is == null) return null; StringBuilder sb = new StringBuilder(); try (InputStreamReader br = new InputStreamReader(is, encoding)) { int len; char[] buf = new char[16384]; while ((len = br.read(buf)) != -1) sb.append(buf, 0, len); ... |
String | getStreamContents(InputStream stream, String charset) get Stream Contents StringBuffer contents = new StringBuffer(); char[] buf = new char[4096]; InputStreamReader reader = null; try { if (charset == null) { reader = new InputStreamReader(stream); } else { reader = new InputStreamReader(stream, charset); ... |