CIS 35A: Introduction to Java Programming

Home | Green Sheet | Lectures | Assignments | FAQ | Grades

Files

Text and Binary Files
Introduction
DataInputStream/DataOutputStream

DataInputStream

DataInputStream reads bytes from the stream and converts them into appropriate primitive type values or strings.

DataInputStream extends FilterInputStream and implements the DataInput interface.

DataOutputStream

DataOutputStream converts primitive type values or strings into bytes and output the bytes to the stream.

DataOutputStream extends FilterOutputStream and implements the DataOutput interface.

Previous | How is I/O Handled in Java? | Text File vs. Binary File | Object I/O | FileInputStream/FileOutputStream | FilterInputStream/FilterOutputStream | ObjectInputStream/ObjectOutputStream | BufferedInputStream/ BufferedOutputStream | DataInputStream/DataOutputStream | Next