Java examples for java.io:InputStream Read
Convert String to InputStream
//package com.java2s; import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { public static InputStream toInputStream(final String in) { return new ByteArrayInputStream(in.getBytes()); }/*from ww w . ja v a 2 s .c o m*/ }