enfrptes

sendassignment@tutorspoint.com

Input Output Streams Homework Help

Tutorspoint.com is an excellent site, which caters to all queries of programming assignment help, regarding java assignments related to topics of Input output streams homework help with a clear solution.

Since all the programming assignment writing help is offered at reasonable rates, Tutorspoint expert service is highly recommended by students worldwide from many universities of U.S. America, Australia, Canada, Germany, Ireland, and Denmark.

 

What is Input/Output Streams (I/O stream)

 

Stream

A) A stream is defined as a continuous flow of data from one place to another.  Here the flow of data is in between the program and peripherals. Hence the name input/output streams.

B) Thus, in java programming, whenever we need to make a data transfer we use streams.

C) The java package that supports streams is java. Io.  The java.io package contains many classes using which we make the data transfer.

D) For data transfer to be done, first of all, the data should be represented in its low-level equivalent i.e. either in the form of bytes (8 bits) or in the form of characters (16 bits).

E) Depending upon the representation of the data to be transferred, the classes in the io package are classified into two categories.

1.  Byte oriented class

2.  Character oriented class

 

Byte-Oriented Class

The byte-oriented classes are again classified into two sections - Classes using which we can read data and classes using which we can write data.

 

Character Oriented Classes

Similarly, the character-oriented classes are also classified into two sections- classes for reading data and classes for writing data.

 

Identifying the classes

We can identify, whether a class is a byte-oriented class or character-oriented class with the help of the following rules, but these may not be 100% true always.

1) If the last part of the name of the class is ‘stream’ then we can say that the given class is a byte-oriented class.

Example:  Data Input stream, Data output stream, file input stream, etc

2) Similarly, if the best part of the name of the class is reader/writer then we can say that the given class is a character-oriented class.

Example: Buffer Reader, file writer e. t. c …

3) Whenever it is required to transfer the data, then we should mention where to where a transfer is to be made i.e. we should mention the address of the source and destination.

4) By creating objects of those classes which contain the addresses of the source and destination.

 

Input Output Streams Homework Help