@Test public void assertToStringFromReader() throws Exception { byte[] b = "toStringFromReader".getBytes(StandardCharsets.UTF_8); InputStream is = new ByteArrayInputStream(b); Reader inr = new InputStreamReader(is, StandardCharsets.UTF_8); assertThat(IOUtils.toString(inr), is("toStringFromReader")); }
public static String toString(final InputStream inputStream, final String encoding) throws IOException { return (null == encoding) ? toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) : toString(new InputStreamReader(inputStream, encoding)); }
IOUtils { public static String toString(final InputStream inputStream, final String encoding) throws IOException { return (null == encoding) ? toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) : toString(new InputStreamReader(inputStream, encoding)); } }
IOUtils { public static String toString(final InputStream inputStream, final String encoding) throws IOException { return (null == encoding) ? toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) : toString(new InputStreamReader(inputStream, encoding)); }  }
IOUtils { public static String toString(final InputStream inputStream, final String encoding) throws IOException { return (null == encoding) ? toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) : toString(new InputStreamReader(inputStream, encoding)); }  static String toString(final InputStream inputStream, final String encoding); static String toString(final Reader reader); }
IOUtils { public static String toString(final InputStream inputStream, final String encoding) throws IOException { return (null == encoding) ? toString(new InputStreamReader(inputStream, StandardCharsets.UTF_8)) : toString(new InputStreamReader(inputStream, encoding)); }  static String toString(final InputStream inputStream, final String encoding); static String toString(final Reader reader);  }