|
-
February 4th, 2003, 11:05 AM
#1
Method to write to files
Hi All,
I need to write an app that reads from one file and writes the data read from that file to multiple files. My first idea was to open an InputStream read a byte and the write the byte to the, say, 3 OutputStreams. This approach seems a little messy becuase it messes around with Exception Handling a bit and I have been thinking of another way to do it.
The next idea I had was to write a method that accepts an InputStream as a param and then to call that method for as many files as I need to write to passing them all the same InputStream. The problem is that only the first file gets to read the data, because by the time the next file starts reading from the InputStream it is already quite far down the data line. Any ideas on how I can overcome or get passed this.
thanks again guys
Byron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|