Explore Java IO

A deep and comprehensive guide on Java IO Libraries
3.8 (2 ratings)
Instead of using a simple lifetime average, Udemy calculates a
course's star rating by considering a number of different factors
such as the number of ratings, the age of ratings, and the
likelihood of fraudulent ratings.
45 students enrolled
Take This Course
  • Lectures 25
  • Length 1.5 hours
  • Skill Level All Levels
  • Languages English
  • Includes Lifetime access
    30 day money back guarantee!
    Available on iOS and Android
    Certificate of Completion
Wishlisted Wishlist

How taking a course works


Find online courses made by experts from around the world.


Take your courses with you and learn anywhere, anytime.


Learn and practice real-world skills and achieve your goals.

About This Course

Published 4/2015 English

Course Description

Java Input Output manipulations are essential in Java daily programming tasks. No matters what kind of Java applications you are working on, dealing with Java IO is almost inevitable.

People usually get frustrated with Java IO since there are so many classes in Java Platform that they can use to work with files in particular and in IO in general. That's because we do not understand which classes should be used for which tasks.

This course is designed to help you to get rid of the frustration by demonstrating from very basic but crucial concepts such as what is file? what is path? Different path types? what is file encoding? Differences between ASCII and Unicode?, and so on. to advanced techniques required for high performance IO operations such as buffers, channels, flipping, clearing buffers, scattering read, and gathering write.

Each complicated concept is clearly explained step by step with code as well as visual representation so that you can catch up with the ideas.

The course is divided into 2 main sections:

The first section will discuss about Stream model:

  • Random access files withe RandomAccessFile
  • Binary Streams with FileInputStream/FileOutputStream
  • Character Streams with FileReader/FileWriter/BufferredReader/BufferedWriter/PrintWriter
  • Object Streams/Serialization with ObjectInputStream/ObjectOutputStream

The second section will be time to discuss about NIO library. Topics will be mentioned including:

  • Buffers - Channels
  • Flipping vs. Rewinding
  • Flipping vs. Clearing
  • Clearing vs. Compacting
  • Marking and Reseting
  • Scattering Read - Gathering Write

What are the requirements?

  • Students who take this course should have basic skills in Java
  • All the source code projects are created in Netbeans 8, running on JDK 8

What am I going to get from this course?

  • 2 quizzes with 41 questions
  • Understand basic concepts: Files, Relative vs. Absolute Paths, symbolic link
  • Understand different levels in stream models
  • Apply different stream classes for different file manipulation: FileInputStream/FileOutputStream, DataInputStream/DataOutputStream, ect
  • Understand object serializations
  • How to store a list of objects effectively
  • Understand the NIO library
  • Apply the NIO models for high performance file operations
  • All the course code projects are included

Who is the target audience?

  • Students who want to master Java IO package
  • Students who want to master Java NIO package
  • Students who want to have a clear and comprehensive understanding of Java IO
  • Students who want to apply Java IO in their jobs
  • Students who will take exams where IOs are related

What you get with this course?

Not for you? No problem.
30 day money back guarantee.

Forever yours.
Lifetime access.

Learn on the go.
Desktop, iOS and Android.

Get rewarded.
Certificate of completion.


Section 1: IO and Stream

You will learn basic but very important concepts: file, file types, and encoding


It is vital to understand different paths in order to work with Java IO. You will also learn the differences between operating systems organizing their files and directories.


Metadata is information about a file or directory such as file type, file permissions, file extension, last modified date time, and so on. You will learn how to get those information using the File class.


You will see it is surprisingly easy to read from and write to a file using the RandomAccessFile class


You will learn how to use the RandomAccessFile to read at a random position in a file.


Writing data to a random position is a file is more complicated than you might think. This lecture shows you how we can append data to a file as well as provides a solution of inserting data at a random position.


This lecture will give you an overview of the stream model in Java traditional IO library. This lecture presents some fundamental concepts you need to grasp before processing further.


You will learn how to read bytes and write bytes using the FileInputStream and FileOutputStream classes


You will learn how to facilitate the reading and writing processes by using the high level stream classes: DataInputStream and DataOutputStream


You will learn how to read and write Unicode characters with the FileReader and FileWriter classes


Learn how to make life easier to read and write Unicode data with high level character stream classes: BufferedReader, BufferedWriter, PrintWriter


Learn how surprisingly easy to append to an existing file.


Learn how to read and write an object to a file. It is called object serialization.


Learn a less painful way to read or write a list of objects from a file.


Learn how to apply the Scanner class to:

  • read from a file
  • write to a file
  • Apply simple patterns to filter content from a file
Test Your IO Knowlege
27 questions
Section 2: Advanced IO: New IO (NIO) Package

Introduction to the NIO library in which you will learn:

  • What does the NIO library do
  • How is the NIO different from the traditional IO library
  • Basic concepts to go further in next lectures: buffers, channels

Learn how to read from a file with the FileChannel class. Also, getting through important concepts:

  • Capacity
  • Limit
  • Position

Learn how to write data to a file using the FileChannel class


When to flip and when to rewind a buffer? Differentiate these actions are crucial when working with buffers


You will learn how to clear a buffer using the clear() method. Also, I will compare the clear() and the flip() methods.


You will learn a more advanced way to clear the buffer using the compact() method. The differences between the clear() and compact() methods are also discussed.


You will learn how to mark and reset to previous marked position in a buffer.


You will learn how to read data from one channel and place in multiple buffers with scattering technique.


You will learn how to write from multiple buffers to one channel using gathering write technique


Learn how surprisingly easy to copy data from a file to another one with channel transferring techniques.

Test Your NIO Skills
14 questions

Students Who Viewed This Course Also Viewed

  • Loading
  • Loading
  • Loading

Instructor Biography

Sera Nguyen, Developer, Architect, Professor

Hi, my is Sera Nguyen and I have a big interest in Software Programming. After completing my Computer Science degree, I was employed as Embedded Software Engineer at Renesas Corporation, then Software Architect at CSC Corporation. After more than 6 years in the Software Industry and completing my Master degree, I became a full time University Professor specializing in Software Engineering Faculty. Currently, I am still working full time as Professor and contracting trainer for software companies and doing research for my PhD degree in software architecture design field.

Ready to start learning?
Take This Course