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:
The second section will be time to discuss about NIO library. Topics will be mentioned including:
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:
Introduction to the NIO library in which you will learn:
Learn how to read from a file with the FileChannel class. Also, getting through important concepts:
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.
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.