IO Introduction

An I/O Stream represents an input source or an output destination. A stream can represent many different kinds of sources and destinations, including disk files, devices, other programs, and memory arrays.

Streams support many different kinds of data, including simple bytes, primitive data types, localized characters, and objects. Some streams simply pass on data; others manipulate and transform the data in useful ways.

No matter how they work internally, all streams present the same simple model to programs that use them: A stream is a sequence of data. A program uses an input stream to read data from a source, one item at a time.

Input Stream : A stream which retrieve data from keyboard or other data input device.
Output Stream : A stream which outputs data to monitor or other output device.

Input or Output conceptually is of two types :-

1 ) IO Streams (streams that perform basic input output from devices and to devices). this includes :-

-Byte Streams : handle I/O of raw binary data.
-Character Streams : handle I/O of character data, automatically handling translation to and from the local character set.
-Buffered Streams : optimize input and output by reducing the number of calls to the native API.
-Scanning and Formatting : allows a program to read and write formatted text.
-I/O from the Command Line : describes the Standard Streams and the Console object.
-Data Streams : handle binary I/O of primitive data type and String values.
-Object Streams : handle binary I/O of objects.

2) File Input/Output (IO that deals with files and directory Input/Output)

-Path Operations looks at methods in the Path class that deal with syntactic operations.
-File Operations introduces concepts common to many of the file I/O methods.
-Checking a File or Directory shows how to check a file’s existence and its level of accessibility.
-Deleting a File or Directory.
-Copying a File or Directory.
-Moving a File or Directory.
-Managing Metadata explains how to read and set file attributes.
-Reading, Writing and Creating Files shows the stream and channel methods for reading and writing files.
-Random Access Files shows how to read or write files in a non-sequentially manner.
-Creating and Reading Directories covers API specific to directories, such as how to list a directory’s contents.
-Links, Symbolic or Otherwise covers issues specific to symbolic and hard links.
-Walking the File Tree demonstrates how to recursively visit each file and directory in a file tree.
-Finding Files shows how to search for files using pattern matching.
-Watching a Directory for Changes shows how to use the watch service to detect files that are added,
removed or updated in one or more directories.


You may also like...