If you want to create InputStream from String in Java, the following code might help.
String text = "simple string";
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream( text.getBytes());
Since ByteArrayInputStream is a concrete class extends from InputStream, you can instantiate it using the new keyword and use it in place where InputStream is expected i.e. use it as an argument passed to another method.
Tuesday, November 11, 2008
Subscribe to:
Post Comments (Atom)
Thanks a lot...
ReplyDeleteThis is quite educational arrange. It has famous breeding about what I rarity to vouch. Colossal proverb.
ReplyDeleteThis trumpet is a famous tone to nab to troths. Congratulations on a career well achieved. This arrange is synchronous s informative impolites festivity to pity. I appreciated what you ok extremely here
Selenium training in bangalore
Selenium training in Chennai
Selenium training in Bangalore
Selenium training in Pune
Selenium Online training
Thank you so much for the great and very beneficial stuff that you have shared with the world.
ReplyDeleteHadoop Training in Bangalore
Hadoop Courses in Bangalore
Hadoop Classes in Bangalore
Hadoop Training Institute in Bangalore
Hadoop Course Syllabus
Best Hadoop Training
Hadoop Training Centers
Thanks For sharing a nice post about all Course.It is very helpful and for us.
ReplyDeleteWorkday training in bangalore