String str = "";//add your string content
InputStream inputStream = new ByteArrayInputStream(str.getBytes());
String str = "";//add your string content
InputStream inputStream = new ByteArrayInputStream(str.getBytes());