Explore Java IO
4.0 (4 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.
60 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Explore Java IO to your Wishlist.

Add to Wishlist

Explore Java IO

A deep and comprehensive guide on Java IO Libraries
4.0 (4 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.
60 students enrolled
Created by Sera Nguyen
Last updated 4/2015
Current price: $12 Original price: $40 Discount: 70% off
4 days left at this price!
30-Day Money-Back Guarantee
  • 1.5 hours on-demand video
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion

Training 5 or more people?

Get your team access to Udemy's top 2,000 courses anytime, anywhere.

Try Udemy for Business
What Will I Learn?
  • 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
View Curriculum
  • 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

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
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
Compare to Other Java.io Courses
Curriculum For This Course
25 Lectures
IO and Stream
15 Lectures 59:52

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

Preview 03:56

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.

Preview 04:08

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.

Preview 05:15

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

Randomly Access Files With java.io.RandomAccessFile

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

Randomly Access File: Reading Randomly

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.

Randomly Access File: Write Randomly

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.

IO Stream Introduction

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

Byte Streams: FileInputStream and FileOutputStream

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

High Level Streams: DataInputStream, DataOutputStream

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

Character Streams: FileReader and FileWriter

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

Lecture: Character Streams: BufferedReader, BufferWriter, PrintWriter

Learn how surprisingly easy to append to an existing file.

Character Streams: Append to files

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

Object Streams: Object Serialization

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

Serialize a list of objects

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
Read file with Scanner class

Test Your IO Knowlege
27 questions
Advanced IO: New IO (NIO) Package
10 Lectures 35:59

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
Introduction to NIO

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

  • Capacity
  • Limit
  • Position
Reading With FileChannel

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

Writing With FileChannel

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

Flipping or Rewinding?

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

Clear The Buffer: flip() vs. clear()

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.

Clear The Buffer: clear() vs. compact()

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

Mark And Reset Position

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

Scattering Read

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

Gathering Write

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

Preview 04:18

Test Your NIO Skills
14 questions
About the Instructor
Sera Nguyen
4.4 Average rating
67 Reviews
1,656 Students
7 Courses
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.