• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Spring FileCopyUtils.copy coverts whitespaces to underscore

 
Anirudh Bhatnagr
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic