123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Education >> View Article

In Java Input /output Stream To Process The Input And Produce The Output

Profile Picture
By Author: Infocampus
Total Articles: 33
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

The java.io package contains nearly every class those we need to perform input and output (I/O) in Java. All these streams represent an input source and an output destination. The stream in the java.io package supports many data such as primitives, object, localized characters, etc.
Java I/O (Input and Output) is used to process the input and produce the output.
Java uses the concept of stream to make I/O operation fast. The java.io package contains all the classes required for input and output operations.
We can perform file handling in java by Java I/O API.
Stream
A stream can be defined as a sequence of data. Java course in bangalore There are two kinds of Streams -
-InPutStream
-Output Stream
InputStream
Java application uses an input stream to read data from a source , source may be a file , an array , peripheral device or socket.
OutputStream
Java application uses an output stream to write data to a destination, it may be a file, an array, peripheral device or socket.
Byte Streams
Java byte streams are used to perform input and output of 8-bit ...
... bytes. Though there are many classes related to byte streams but the most frequently used classes are FileInputStream and FileOutputStream.
Character Streams
Java Byte streams are used to perform input and output of 8-bit bytes, whereas JavaCharacter streams are used to java training center bangalore perform input and output for 16-bit unicode. Though there are many classes related to character streams but the most frequently used classes are FileReader and FileWriter.
Standard Streams
All the programming languages provide support for standard I/O where the user's program can take input from a keyboard and then produce an output on the computer screen. Java provides the following three standard streams −
Standard Input − This is used to feed the data to user's program and usually a keyboard is used as standard input stream and represented as System.in.
Standard Output − This is used to output the Advanced java training in bangalore data produced by the user's program and usually a computer screen is used for standard output stream and represented as System.out.
Standard Error − This is used to output the error data produced by the user's program and usually a computer screen is used for standard error stream and represented as System.err.
FileInputStream
This stream is used for reading data from the files. Objects can be created using the keyword new and there are several types of constructors available.
Java FileInputStream class obtains input bytes from a file. It is used for reading byte-oriented data (streams of raw bytes) such as image data, audio, video etc. You can also read character-stream data. But, for java/j2ee classes bangalore reading streams of characters, it is recommended to use FileReader class.

FileOutputStream
FileOutputStream is used to create a file and write data into it. The stream would create a file , if it doesn't already exist, before opening it for output.
If we have to write primitive values into a file, use FileOutputStream class. We can write byte-oriented as well as character-oriented data through FileOutputStream class. But, for character-oriented data, it is preferred to use FileWriter than FileOutStream.
File Navigation and I/O
There are several other classes that we best core java training in bangalore would be going through to get to know the basics of File Navigation and I/O
- File Class
- FileReader Class
- FileWriter Class
Java BufferedOutputStream Class :
Java BufferedOutputStream class is used for buffering an output stream. It internally uses buffer to store data. It adds more efficiency than to write data directly into a stream. So, it makes the performance fast.
Java BufferedInputStream Class ;
Java BufferedInputStream class is used to read information from stream. It internally uses buffer mechanism to make the performance fast.
The important points about BufferedInputStream are:
- When the bytes from the java training center bangalore stream are skipped or read, the internal buffer automatically refilled from the contained input stream, many bytes at a time.
- When a BufferedInputStream is created, an internal buffer array is created.
This is the short description about the Input / Output stream .To get the more knowledge on java join Infocampus Software Training Institute .
Author : Infocampus is the best institute for the java course in bangalore . It provides java training in less fees with the real time project . For java /j2ee classes placement facility is also available. 3 days free demo classes are also available for Advanced java training. Infocampus provides best core java training in bangalore by the more than 10 years experienced trainers . Complete practical session is available for Core & Advanced java training .
Learn packages, multithreading, struts framework , inner classes in java course.To book the seat for free demo class call at : 9738001024 or to know the syllabus for java training visit at : http://www.infocampus.co.in/java-training-bangalore.html

Total Views: 690Word Count: 783See All articles From Author

Add Comment

Education Articles

1. How Chandigarh's Growing Business Ecosystem Is Supporting Business Analytics Careers
Author: Anusha

2. Oscp Certification Guide: Exam, Cost, Training, And Career Value
Author: Passyourcert

3. How To Pass The Asis Cpp Exam On Your First Try: Training Tips & Strategies
Author: Passyourcert

4. Top Things To Consider Before Choosing An Online Bca Course
Author: Grass Solution

5. Hair Growth Clinic In Anna Nagar – Advanced Solutions For Healthy And Strong Hair
Author: MAHESH

6. Who Is Eligible For An Honorary Doctorate?
Author: UniversityGuru

7. What Is Search Engine Optimization? Everything You Need To Know About Seo In 2026
Author: Rohit Shyam

8. Invisalign In Velachery – The Modern Way To Straighten Your Teeth Comfortably
Author: ivar

9. Digital Smile Design In Chennai – The Future Of Personalized Cosmetic Dentistry
Author: ivar

10. Cosmetic Smile Design In Chennai – Transform Your Smile With Advanced Cosmetic Dentistry
Author: ivar

11. Ai Agents With N8n Training | Ai Agents Course Online
Author: Vamsi Ulavapati

12. Agentic Ai With Copilot Studio Online Training | Agentic Ai
Author: Visualpath

13. Azure Data Engineer Training Online | Course In Ameerpet
Author: naveen

14. Is Bicsi Data Center Design Consultant Dcdc Certification Worth It In 2026?
Author: Passyourcert

15. Join Nda Coaching With Schooling In Pune And Achieve Your Defence Dream
Author: Delhi Career Group

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: