Hi All, I have a stream of a file in the form of a Reader. I pass this Reader to a 'tool' that does something. What I want to do is this: After the stream has been obtained from a file I want to add something to the stream and still be able to pass the Reader to the 'tool' for processing. Basically I want to add to the content of the file 'after' it has been and read(ie a Reader has been obtained) and I also want it to be in the form of a Reader so that it can be passed to the 'tool'. Can anyone of you please suggest something on this ? Thanks in advance. Arya
The simplest thing to do would be to read your file into a String object, concatenate the String object with whatever you want to add, create a java.io.StringReader instance from the combined String and pass that StringReader to your tool.
It seems like we ought to be able to cobble something together to work like a Unix or DOS filter. You should be able to chain these things together. Has anybody made a generalized solution to this? Maybe it would require putting each stage on a thread? I thought about it for about 10 minutes once and then went and had some chocolate instead.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi