IO Handling in Java
- Sequence of Bytes
- Flow of Bytes
2. A stream can be compared to a pipe. It has two main parts: Input Stream and Output Stream.
3. Files are the collection of related information.
4. A file is opened in several ways:
Adding something to the file is known as appending the file.
5. Text files are human readable and binary files are not human readable.
6. In Java IO is of two types:
- Byte Oriented (byte stream or binary files)
- Character Oriented (text files or character stream)
7. Character Stream was not present in JDK 1.0
8. While working with byte stream there will be no automatic buffering and in case of a character stream, there will be automatic buffering.
9. Character Stream is preferred over byte stream as Internationalization is easy in character stream and automatic translation depends upon the locale. It is based on UNICODE.
In byte stream: InputStream and OutputStream is associated with every name convention of class as in character stream we have Writer and Reader.