How can you take string into InputStream?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / himanshu gupta
String str="";
int i=0
InputStream in=new FileInputStream("File url");
while((i=in.read())!=-1)
{
str=str+(char)i;
}
System.out.println(str);
Is This Answer Correct ? | 1 Yes | 0 No |
Can a abstract class be defined without any abstract methods?
What is an Iterator interface?
What are null interfaces? Give some examples?
Is java same as core java?
Is java free for businesses?
How java is platform independent?
41 Answers College School Exams Tests, Infosys, TCS,
How to perform binary search in java?
What is exception propagation?
Can an interface extend a class?
What is the use of Getters and Setters method ?
Why static functions are used?
what are the differences between final,finally,finalize methods?