commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Jakarta-commons Wiki] Update of "transaction faq" by OliverZeigermann
Date Mon, 12 Mar 2007 10:47:05 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jakarta-commons Wiki" for change notification.

The following page has been changed by OliverZeigermann:

New page:
I wrote the following code to create temp.txt in the stored directory
But some file with a diff name(aW5kZXgxLnR4dA%3D%3D) gets created. Does someone know how to
specify the name of the output file

        Logger logger = Logger.getLogger("d:\\Raj\\test.log");
        LoggerFacade loggerFacade = new Log4jLogger(logger);
        FileResourceManager fileResourceManager = 
               new FileResourceManager("D:\\Raj\\stored", "D:\\Raj\\working", true, loggerFacade
        String txId = fileResourceManager.generatedUniqueTxId();
        System.out.println("Working Directory : " + fileResourceManager.getWorkDir());
        System.out.println("Store Directory : " + fileResourceManager.getStoreDir());
        System.out.println("Transaction Identifier : " + txId);
        FileInputStream fis = new FileInputStream("D:\\Raj\\stored\\index.txt");
        byte[] bt1 = new byte[100];;
        OutputStream os = fileResourceManager.writeResource(txId, "temp.txt");

'''Answer''': You just need to disable urlEncoding: new FileResourceManager("D:\\Raj\\stored",
"D:\\Raj\\working", '''false''', loggerFacade );

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message