<<< InputStream hierarchy constructors | Index | DataInputStream implements DataInput interface >>> |
Attaching a binary input stream to a file
The FileInputStream object must be instantiated first, its constructor requires a File object or a file name.
The BufferedInputStream object must be instantiated next, its constructor taking the FileInputStream object.
The DataInputStream is instantiated, its constructor taking the BufferedInputStream object
DataInputStream in = new DataInputStream( new BufferedInputStream( new FileInputStream("myfile.dat")));
Note that the DataInputStream implements the DataInput interface
<<< InputStream hierarchy constructors | Index | DataInputStream implements DataInput interface >>> |