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 will be the output of round(3.7) and ceil(3.7)?

1067


What are the advantages of java over cpp?

1022


What is the structure of java?

964


what is the swingutilities.invokelater(runnable) method for? : Java thread

991


What is the purpose of return statement?

1011


What is percentage in java?

955


Why do we need hashmap in java?

1028


What is the properties class?

1031


What is charat java?

906


Can you write a java class that could be used both as an applet as well as an application?

908


What is a finally block? Is there a case when finally will not execute?

989


What does math floor () do?

918


Is null a string or object in java?

919


Explain when we should make an instance variable private.

1042


How do I compare two strings in word in java?

935