java streams

hi i find handling streams in java little complex...........

I want to know what the following codes doing .....

File f = new File("Students.txt");

FileInputStream fis = new FileInputStream(f);

BufferedInputStream bis = new BufferedInputStream(fis);

DataInputStream dis = new DataInputStream(bis);

[337 byte] By [Sundar.nagarathinama] at [2007-11-26 18:15:39]
# 1
It creates a DataInputStream for the file Students.txtKaj
kajbja at 2007-7-9 5:49:10 > top of Java-index,Java Essentials,Java Programming...
# 2

That is the "Decorator" design pattern. You could search that using Google.

In short, the different streams all obey the same interface and can wrap each other to add extra behaviour to the stream (such as reading whole lines at a time, or reading through a Buffer to improve performance).

TimRyanNZa at 2007-7-9 5:49:11 > top of Java-index,Java Essentials,Java Programming...