|
|
The java.io Package - Overview
- the package contains three main groups of classes and interfaces
- classes to build data streams
- classes and interfaces for serialization
- classes and interfaces for working with the file system
Data Streams (JCL1)
- data streams that read values from a data source are input streams
- data streams that write values to a data repository are output streams
- the data can be either byte or character values
| DataStream SuperClasses |
| Byte Streams |
Character Streams |
| abstract class InputStream |
abstract class Reader |
| abstract class OutputStream |
abstract class Writer |
Filter Streams
- filter streams perform some processing or filtering as the data is passed through
- a filter ouput stream performs the processing before the data is written out
- a filter input stream performs the processing after the data is read from its original source
| FilterStream SuperClasses |
| Byte Streams |
Character Streams |
| class FilterInputStream |
class FilterReader |
| class FilterOutputStream |
class FilterWriter |
In-Memory Streams
Pipes
Files
| Note |
|
The File class can be used to create directories
|
Serialization (JCL1)
- serialization is the process of converting an object to a stream of bytes in such a manner that the original object can be rebuilt (lets you write an object to a file or other data container)
|