Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How can you take string into InputStream?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is an object’s lock and which object’s have locks?

967


How are this() and super() used with constructors in java programming?

1064


What are desktop procedures?

1045


What do bitwise operators do?

1015


What is JVM and is it platform independent?

1053


Can you call a method on a null object?

1011


What is private protected in java?

1056


What are the two basic ways in which classes that can be run as threads may be defined?

1075


What are synchronized methods ?

1116


What is covariant return type?

1115


What is byte data type?

1004


Differentiate between nested and inner class in java.

1006


What are examples of modifiers?

1130


How dead lock situation occurs in java and how you can identify it?

998


What are encapsulation, inheritance and polymorphism?

1015