Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Explore Java IO
Rating: 4.3 out of 5(24 ratings)
173 students

Explore Java IO

A deep and comprehensive guide on Java IO Libraries
Created bySera Nguyen
Last updated 4/2015
English

What you'll 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

Course content

2 sections25 lectures1h 35m total length
  • Basic concepts: File, File Types, Encoding3:56

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

  • Path – Relative Path – Absolute Path4:08

    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.

  • Get File Metadata With The java.io.File class5:15

    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.

  • Randomly Access Files With java.io.RandomAccessFile4:28

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

  • Randomly Access File: Reading Randomly3:45

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

  • Randomly Access File: Write Randomly4:29

    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.

  • IO Stream Introduction2:27

    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.

  • Byte Streams: FileInputStream and FileOutputStream4:17

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

  • High Level Streams: DataInputStream, DataOutputStream3:08

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

  • Character Streams: FileReader and FileWriter3:49

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

  • Lecture: Character Streams: BufferedReader, BufferWriter, PrintWriter4:34

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

  • Character Streams: Append to files2:02

    Learn how surprisingly easy to append to an existing file.

  • Object Streams: Object Serialization3:35

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

  • Serialize a list of objects3:42

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

  • Read file with Scanner class6:17

    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

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

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

Who this course is for:

  • 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