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 |
Explain about arraylist?
What are the two major components of JDBC?
Is arraylist ordered in java?
How Marker Interfaces are instruct to complete the desired need ?
Explain cookies?
How is hashset defined in java?
Write a program to print count of empty strings in java 8?
What is tcp and udp?
What is scanner in java?
when asub class inherits a super class and overrides a public method of super class in sub class(public method in super class). why these methods needs to be public in sub class. (otherwise compile time error).
What is communist flag?
What is meant by class loader and how many types are there?