John Jai wrote:... and a continue to ignore the divider line and read the next customer details.
Joanne Neal wrote:Instead you should close your current output stream and create a new one at that point.
Stanley Mungai wrote:Guys I realy Appreciate your help but am still getting a write Error Is there any other method I can use to separate the Customer details and store them in different file something like funtion?
Stanley Mungai wrote:Winston, I have No choice over this. I have to split that file one way or the other as each contains an Email Address and Each should be sent to the Respective Customer. When it is this way, My sending program will send the Entire file to one or all customer while this is confidential information. Unless You can tell me of a way to send each Customer his details without Splitting the File, I really want to do this.
Stanley Mungai wrote:I tried the Pseudocode and I got A write error.
Assign the new FileOutputStream to fos, create a new BufferedWriter using fos and assign this to bw.
Stanley Mungai wrote:Every time I try to do this I get an Error that fos is already defined in main.
Stanley Mungai wrote:Joanne, You are Simply the Best, Got it, I got It This time I got . You are right , A picture Paints a thousand Words. Thank you So much I almost gave up on this one. Once More, Thank you.
Stanley Mungai wrote:Winston, Oh am sorry, I thought from one dimension. But like I said, the files are deleted a Minute after that. I wish I could have found a better way to do that, but with the agency these So Called Admins and the Pressure they put, This is what I could have given them at this time. I am really new to Java, Please Understand me.
Stanley Mungai wrote:Now when the Pressure is minimal as they have at least something working, I will have the time to explore other Fronts.
Stanley Mungai wrote:Trust me Winston I have all over the net trying to get A solutions. If my Admins were patient with me, I guess I would have given them something better to work with. I Just do not know how to send these things as an attachments without having them as files first. Trust me if I had, I would have gone for that option smiling "JAVA" from ear to ear.
Because I had tried to store the Splits into different arrays and use the arrays instead of the files, But I did not find an attachment to send and mind you, these files are very big and My Admins and customers want them as PDF Attachments. So that says that am Converting them to PDF first before Sending them. I hope you can now see Why I needed files. For conversion to PDF and for sending as attachments. Am using I-text for conversion.
split the file into Strings and then send those directly to a mail program
Stanley Mungai wrote:I hope you can now see Why I needed files. For conversion to PDF and for sending as attachments. Am using I-text for conversion.