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 |
What are teh sub-classes of a component class?
What does system.gc() and runtime.gc() methods do?
Define Compiling?
How two different class threads communicate with each other?. send example code.
What is string and example?
How many bits is a 64 bit byte?
What is the base class for error and exception?
What are runtime exceptions?
What are register variables what are the advantages?
What is Servlet?
Which containers may have a MenuBar?
what is the difference b/w PUT and POST method to send data to the server