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 can u create the object with out new operator
How to reduce flicking in animation?
What is aggregation?
What are instance variables?
Which class is the superclass of all classes?
What is a copy constructor in java?
Can we write multiple catch blocks under single try block?
Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.
Why do we use threads in java?
Does windows 10 need java?
When finalize method is called?
How can be define MARKER interfce in java