Please correct me If I am wrong.
Say there is file X and process A want to write on file X.
A stream is a sequence of bytes. In the NTFS file system, streams contain the data that is written to a file.
We can think of pipeline like a river in jangle. Every river has its own way.
We can think of stream like fishes swim there.
The way between process A and file X, is pipeline.Then stream can move in pipeline.
Is it right?
Now this line:
or this lineCode:FileReader f=new FileReader(thefile);
create a stream.Code:FileInputStream fstream = new FileInputStream("textfile.txt");
Bytes go to the buffer first.
Right?
Another question:
This is from JAVA cookbook , May someone explain about piping?Quote:
The ability to reassign these streams corresponds to what Unix (or DOS command line) users
think of as redirection, or piping. This mechanism is commonly used to make a program read
from or write to a file without having to explicitly open it and go through every line of code
changing the read, write, print, etc., calls to refer to a different stream object. The open operation
is performed by the command-line interpreter in Unix or DOS, or by the calling class in Java.
