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...

What is a stream? what are the different types and classes
of Streams?

Answer Posted / kumar

Most of the programs work with external data stored either
in local files or coming from other computers on the
network. Java has a concept of working with so-called
streams of data. After a physical data storage is mapped to
a logical stream, a Java program reads data from this
stream serially - byte after byte, character after
character, etc. Some of the types of streams are byte
streams (InputStream, OutputStream) and character streams
(Reader and Writer). The same physical file could be read
using different types of streams, for example,
FileInputStream, or FileReader.

There are different types of data, and hence different
types of streams.

Here's the sequence of steps needed to work with a stream:
1. Open a stream that points at a specific data
source: a file, a socket, URL, etc.
2. Read or write data from/to this stream.
3. Close the stream.

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a string token?

1040


What is empty list in java?

1071


How to sort array of 0 and 1 in java?

949


What are the restrictions that are applied to the java static methods?

985


Can we have two main methods in a java class?

1052


What is a local block?

1132


What is nextint java?

1058


Can a class have multiple constructors?

1046


What is a lock or purpose of locks in java?

1022


Can we nested try statements in java?

1097


What do you mean by global variable?

947


What is the difference amongst jvm spec, jvm implementation, jvm runtime ?

966


How is Object Oriented Programming different from Procedure Oriented Programming?

1047


What is the purpose of file class?

1025


What is constant in programming?

1105