Friday, May 31, 2013

Java best practices


Saving files

Instead of relaying on the platform JVM, save your files on the OS encoding your files names using standard API

 java.net.URLEncoder.encode(String s, String enc)
 java.netURLDecoder.decode(String s, String enc)

Otherwise the results might be different from one OS to another.