Here you can find the source of getInputStreamFromString(String s)
public static InputStream getInputStreamFromString(String s)
//package com.java2s; //License from project: Apache License import java.io.ByteArrayInputStream; import java.io.InputStream; public class Main { public static InputStream getInputStreamFromString(String s) { return new ByteArrayInputStream(s.getBytes()); }/* w ww.ja v a 2s .co m*/ }