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 the purpose of abstract class?

978


Difference between collection, collection and collections in java?

961


Tell some latest versions in JAVA related areas?

934


Can we call virtual funciton in a constructor ?

2143


What are locale settings?

943


Is set ordered?

934


What is the difference between JDK and JVM?

1192


What is mutable object and immutable object?

1090


What is ordered map in java?

959


Which are different kinds of source code?

1058


How does compareto work in java?

995


Is 0 true or false in java?

954


What is namespace in java?

952


Compare java and python.

943


how come we know the object is no more used in the class?

6376