@Test public void testToInputStream() throws IOException { final InputStream input = IOUtils.toInputStream("test", StandardCharsets.UTF_8); assertEquals("test", IOUtils.toString(input, StandardCharsets.UTF_8)); }
public static InputStream toInputStream(final String str, final Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); }
IOUtils { public static InputStream toInputStream(final String str, final Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); } }
IOUtils { public static InputStream toInputStream(final String str, final Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); } IOUtils(); }
IOUtils { public static InputStream toInputStream(final String str, final Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); } IOUtils(); static byte[] toByteArray(final InputStream input); static InputStream toInputStream(final String str, final Charset charset); static String toString(final InputStream input, final Charset charset); static void copy(final InputStream input, final OutputStream output); }
IOUtils { public static InputStream toInputStream(final String str, final Charset charset) { return new ByteArrayInputStream(str.getBytes(charset)); } IOUtils(); static byte[] toByteArray(final InputStream input); static InputStream toInputStream(final String str, final Charset charset); static String toString(final InputStream input, final Charset charset); static void copy(final InputStream input, final OutputStream output);  }