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 |
How does arrays sort work in java?
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What is the difference between static binding and dynamic binding?
What is string example?
What is another word for methodology?
Explain about core java?
What is the use of http-tunneling in rmi?
What is split return?
What modifiers are used for interface declaration?
What is anonymous class?
How garbage collection is done in java?
What is preparedstatement in java?