Input/Data Stream Help

B

Ben

I have a program that outputs text. I want to modify it to use a data
stream that can be read by another program. How do I go about this?
Are there any online guides where I can learn this? I have looked
around, but haven't found anything useful as of yet.

Thanks for any responses.

Ben.
 
B

Ben

After more research I believe my best option is to use a print stream
or writer. However I cannot find any code examples or guides where it
has been used with two seperate programs. Does anyone know where there
are any examples of this? or could anyone tell me how this can be
achieved.

Thanks.

Ben.
 
T

tom fredriksen

Ben said:
I have a program that outputs text. I want to modify it to use a data
stream that can be read by another program. How do I go about this?
Are there any online guides where I can learn this? I have looked
around, but haven't found anything useful as of yet.

Are you thinking about unix style redirection mechanisms, as in the
output of one program is fed into another program on an os/shell level?

System.out represents the stdout mechanism of any *nix system, while
System.in represents the stdin. So you just use System.out.println for
output and any InputStream based class initialised on the System.in
property to get the input stream.

/tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top