how to read a string using inputstream in java code example
Example: java create inputstream from string
InputStream targetStream = new ByteArrayInputStream("your string".getBytes());
InputStream targetStream = new ByteArrayInputStream("your string".getBytes());