Hi 
Iam trying to write two files as part of my transaction into a ftp server. I dont have 
the physical file in my local system and i only have the contents. So iam opening a 
connection stream to the ftp server using the method ftpClient.storeFile 
(remotefilename). I am successful in opening the first outputstream but my program 
hangs when it tries to open the second outputstream. This is the code iam using,


                String txnFileName = "txn1";
                String txnIsDoneFile = "txn1.ISDONE";
                String keywordContents = "Transcation contents";
                String isDoneContents = "ISDONE contents";
                try {
                        OutputStream firstOutputStream = ftpClient.storeFileStream 
(txnFileName);
                        OutputStream secondOutputStream = 
ftpClient.storeFileStream(txnIsDoneFile);

                        DataOutputStream firstDataOutputStream = new DataOutputStream 
(firstOutputStream);
                        firstDataOutputStream.writeBytes (keywordContents);
                        firstDataOutputStream.close();

                        DataOutputStream secondDataOutputStream = new DataOutputStream 
(secondOutputStream);
                        secondDataOutputStream.writeBytes(isDoneContents);
                        secondDataOutputStream.close();
                        
                }
                catch (Exception exp){
                        exp.printStackTrace();
                }


I tried to open the second ouputstream after closing the first ouputstream. It always 
returned a null in that case.

any help in this regard will be greatly appreciated.

thankyou
govind


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to