How can you take string into InputStream?

Answer Posted / sudhakar p

Step 1: Convert String to byte array

Step 2: Create a ByteArrayInputStream passing bytes[] to to
the contructor

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the major advantages of internal iteration over external iteration?

807


If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?

797


Is intellij better than eclipse?

755


What does n mean?

695


What is a method in programming?

848


Is treeset sorted in java?

759


What is the use of beaninfo?

779


Does sprintf add a null terminator?

808


What is the nested interface?

784


What does string mean in java?

812


Can we sort set in java?

738


Is array dynamic in java?

659


What are alternatives to java serialization?

797


Are maps ordered java?

692


What differences exist between iterator and listiterator?

795