File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other JSE/JEE APIs and the fly likes Spring FileCopyUtils.copy coverts whitespaces to underscore Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "Spring FileCopyUtils.copy coverts whitespaces to underscore" Watch "Spring FileCopyUtils.copy coverts whitespaces to underscore" New topic
Author

Spring FileCopyUtils.copy coverts whitespaces to underscore

Anirudh Bhatnagr
Greenhorn

Joined: Sep 01, 2010
Posts: 12
Hi,

I have wriiten a file upload/download utility using Spring.
The issue I am facing is with FileCopyUtils.copy function,
If I pass a file name with white spaces FileCopyUtils.copy coverts them to underscore.
For example if filename is "hello world.txt"
It would be downloaded as "hello_world.txt"
All though I am putting quotes but still not able to get the desried filename.
Is this a limitation?
Following is the code:



Any help or pointers is appreciated.

Thanks,
Anirudh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Spring FileCopyUtils.copy coverts whitespaces to underscore
 
Similar Threads
Replace not working when trying to change filename
Unable to upload file
Creating PDF file using FileOutputStream
Download file HELP?
URL-Pattern, Internet Explorer and Flash Videos