Must start with an underlying object, such as FileOutputStream , ByteArrayOutputStream , or PipedOutputStream . Can enclose an underlying object in a filter, such as BufferedOutputStream or DataOutputStream .
Serialization just writes out an object's state as a sequence of bytes.
Deserialization, therefore, needs the class files to reconstitute the objects. All of state, including objects contained via composition, are serialized. Allows you to store objects in files for later retrieval, or to send objects across a network, etc. Class RandomAccessFile Allows you to both read from and write to a file. Class File Represents the name of a file or directory on the host file system.