ExportFileNameEncoder { public static String decodeZipFileName( String encodedFileName ) { try { return URLDecoder.decode( encodedFileName, "UTF-8" ); } catch ( UnsupportedEncodingException e ) { e.printStackTrace(); return encodedFileName; } }  static String encodeZipFileName( String fileName ); static String decodeZipFileName( String encodedFileName ); static String encodeZipPathName( String path ); static String decodeZipPath( String encodedPath );  }
@Test public void testDecodeZipFileName() { assertEquals( "", ExportFileNameEncoder.decodeZipFileName( "" ) ); assertEquals( "simpleFileName.extention", ExportFileNameEncoder.decodeZipFileName( "simpleFileName.extention" ) ); assertEquals( "two words", ExportFileNameEncoder.decodeZipFileName( "two+words" ) ); assertEquals( "special characters:(+)%^", ExportFileNameEncoder.decodeZipFileName( "special+characters%3A%28%2B%29%25%5E" ) ); }