Thanks Jesper
you are right
I was playing around and it occurred to me -
if we can use
method to send a file to STDOUT,
why not use same method to send STDIN to a file
So I was checking the feasibility of same.
below line of code works however, to indicate data end (i.e. to close STDIN), one has to terminate the program itself...
I was looking for something that lets USER to indicate - that's all data I wanted to input here...